@industry-theme/backlogmd-kanban-panel 1.0.41 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/mocks/panelContext.d.ts.map +1 -1
- package/dist/panels/KanbanPanel.d.ts.map +1 -1
- package/dist/panels/kanban/components/BoardEmptyState.d.ts.map +1 -1
- package/dist/panels/kanban/components/TaskCard.d.ts.map +1 -1
- package/dist/panels/kanban/hooks/useKanbanData.d.ts +2 -2
- package/dist/panels/kanban/hooks/useKanbanData.d.ts.map +1 -1
- package/dist/panels.bundle.js +1345 -356
- package/dist/panels.bundle.js.map +1 -1
- package/dist/telemetry.d.ts +36 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/package.json +7 -1
package/dist/panels.bundle.js
CHANGED
|
@@ -1132,7 +1132,7 @@ class KeyboardSensor {
|
|
|
1132
1132
|
if (isKeyboardEvent(event)) {
|
|
1133
1133
|
const {
|
|
1134
1134
|
active,
|
|
1135
|
-
context,
|
|
1135
|
+
context: context2,
|
|
1136
1136
|
options
|
|
1137
1137
|
} = this.props;
|
|
1138
1138
|
const {
|
|
@@ -1153,7 +1153,7 @@ class KeyboardSensor {
|
|
|
1153
1153
|
}
|
|
1154
1154
|
const {
|
|
1155
1155
|
collisionRect
|
|
1156
|
-
} =
|
|
1156
|
+
} = context2.current;
|
|
1157
1157
|
const currentCoordinates = collisionRect ? {
|
|
1158
1158
|
x: collisionRect.left,
|
|
1159
1159
|
y: collisionRect.top
|
|
@@ -1163,7 +1163,7 @@ class KeyboardSensor {
|
|
|
1163
1163
|
}
|
|
1164
1164
|
const newCoordinates = coordinateGetter(event, {
|
|
1165
1165
|
active,
|
|
1166
|
-
context:
|
|
1166
|
+
context: context2.current,
|
|
1167
1167
|
currentCoordinates
|
|
1168
1168
|
});
|
|
1169
1169
|
if (newCoordinates) {
|
|
@@ -1174,7 +1174,7 @@ class KeyboardSensor {
|
|
|
1174
1174
|
};
|
|
1175
1175
|
const {
|
|
1176
1176
|
scrollableAncestors
|
|
1177
|
-
} =
|
|
1177
|
+
} = context2.current;
|
|
1178
1178
|
for (const scrollContainer of scrollableAncestors) {
|
|
1179
1179
|
const direction = event.code;
|
|
1180
1180
|
const {
|
|
@@ -3026,7 +3026,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
|
|
|
3026
3026
|
scrollableAncestorRects
|
|
3027
3027
|
});
|
|
3028
3028
|
const publicContext = useMemo(() => {
|
|
3029
|
-
const
|
|
3029
|
+
const context2 = {
|
|
3030
3030
|
active,
|
|
3031
3031
|
activeNode,
|
|
3032
3032
|
activeNodeRect,
|
|
@@ -3045,10 +3045,10 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
|
|
|
3045
3045
|
measuringScheduled,
|
|
3046
3046
|
windowRect
|
|
3047
3047
|
};
|
|
3048
|
-
return
|
|
3048
|
+
return context2;
|
|
3049
3049
|
}, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);
|
|
3050
3050
|
const internalContext = useMemo(() => {
|
|
3051
|
-
const
|
|
3051
|
+
const context2 = {
|
|
3052
3052
|
activatorEvent,
|
|
3053
3053
|
activators,
|
|
3054
3054
|
active,
|
|
@@ -3061,7 +3061,7 @@ const DndContext = /* @__PURE__ */ memo(function DndContext2(_ref) {
|
|
|
3061
3061
|
over,
|
|
3062
3062
|
measureDroppableContainers
|
|
3063
3063
|
};
|
|
3064
|
-
return
|
|
3064
|
+
return context2;
|
|
3065
3065
|
}, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);
|
|
3066
3066
|
return React2__default.createElement(DndMonitorContext.Provider, {
|
|
3067
3067
|
value: registerMonitorListener
|
|
@@ -4057,11 +4057,11 @@ var getThemeContext$1 = () => {
|
|
|
4057
4057
|
};
|
|
4058
4058
|
var ThemeContextSingleton = getThemeContext$1();
|
|
4059
4059
|
var useTheme = () => {
|
|
4060
|
-
const
|
|
4061
|
-
if (!
|
|
4060
|
+
const context2 = useContext(ThemeContextSingleton);
|
|
4061
|
+
if (!context2) {
|
|
4062
4062
|
throw new Error("useTheme must be used within a ThemeProvider");
|
|
4063
4063
|
}
|
|
4064
|
-
return
|
|
4064
|
+
return context2;
|
|
4065
4065
|
};
|
|
4066
4066
|
const PanelGroupContext$1 = createContext(null);
|
|
4067
4067
|
PanelGroupContext$1.displayName = "PanelGroupContext";
|
|
@@ -4106,8 +4106,8 @@ function PanelWithForwardedRef$1({
|
|
|
4106
4106
|
tagName: Type = "div",
|
|
4107
4107
|
...rest
|
|
4108
4108
|
}) {
|
|
4109
|
-
const
|
|
4110
|
-
if (
|
|
4109
|
+
const context2 = useContext(PanelGroupContext$1);
|
|
4110
|
+
if (context2 === null) {
|
|
4111
4111
|
throw Error(`Panel components must be rendered within a PanelGroup container`);
|
|
4112
4112
|
}
|
|
4113
4113
|
const {
|
|
@@ -4121,7 +4121,7 @@ function PanelWithForwardedRef$1({
|
|
|
4121
4121
|
registerPanel,
|
|
4122
4122
|
resizePanel: resizePanel2,
|
|
4123
4123
|
unregisterPanel
|
|
4124
|
-
} =
|
|
4124
|
+
} = context2;
|
|
4125
4125
|
const panelId = useUniqueId$1(idFromProps);
|
|
4126
4126
|
const panelDataRef = useRef({
|
|
4127
4127
|
callbacks: {
|
|
@@ -5486,7 +5486,7 @@ function PanelGroupWithForwardedRef$1({
|
|
|
5486
5486
|
forceUpdate();
|
|
5487
5487
|
}
|
|
5488
5488
|
}, [forceUpdate]);
|
|
5489
|
-
const
|
|
5489
|
+
const context2 = useMemo(() => ({
|
|
5490
5490
|
collapsePanel,
|
|
5491
5491
|
direction,
|
|
5492
5492
|
dragState,
|
|
@@ -5513,7 +5513,7 @@ function PanelGroupWithForwardedRef$1({
|
|
|
5513
5513
|
width: "100%"
|
|
5514
5514
|
};
|
|
5515
5515
|
return createElement(PanelGroupContext$1.Provider, {
|
|
5516
|
-
value:
|
|
5516
|
+
value: context2
|
|
5517
5517
|
}, createElement(Type, {
|
|
5518
5518
|
...rest,
|
|
5519
5519
|
children: children2,
|
|
@@ -7981,6 +7981,724 @@ class PanelFileSystemAdapter {
|
|
|
7981
7981
|
return path2.replace(/^\/+/, "").replace(/\/+$/, "").replace(/\/+/g, "/");
|
|
7982
7982
|
}
|
|
7983
7983
|
}
|
|
7984
|
+
var _globalThis = typeof globalThis === "object" ? globalThis : typeof self === "object" ? self : typeof window === "object" ? window : typeof global === "object" ? global : {};
|
|
7985
|
+
var VERSION = "1.9.0";
|
|
7986
|
+
var re$1 = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
|
|
7987
|
+
function _makeCompatibilityCheck(ownVersion) {
|
|
7988
|
+
var acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);
|
|
7989
|
+
var rejectedVersions = /* @__PURE__ */ new Set();
|
|
7990
|
+
var myVersionMatch = ownVersion.match(re$1);
|
|
7991
|
+
if (!myVersionMatch) {
|
|
7992
|
+
return function() {
|
|
7993
|
+
return false;
|
|
7994
|
+
};
|
|
7995
|
+
}
|
|
7996
|
+
var ownVersionParsed = {
|
|
7997
|
+
major: +myVersionMatch[1],
|
|
7998
|
+
minor: +myVersionMatch[2],
|
|
7999
|
+
patch: +myVersionMatch[3],
|
|
8000
|
+
prerelease: myVersionMatch[4]
|
|
8001
|
+
};
|
|
8002
|
+
if (ownVersionParsed.prerelease != null) {
|
|
8003
|
+
return function isExactmatch(globalVersion) {
|
|
8004
|
+
return globalVersion === ownVersion;
|
|
8005
|
+
};
|
|
8006
|
+
}
|
|
8007
|
+
function _reject(v) {
|
|
8008
|
+
rejectedVersions.add(v);
|
|
8009
|
+
return false;
|
|
8010
|
+
}
|
|
8011
|
+
function _accept(v) {
|
|
8012
|
+
acceptedVersions.add(v);
|
|
8013
|
+
return true;
|
|
8014
|
+
}
|
|
8015
|
+
return function isCompatible2(globalVersion) {
|
|
8016
|
+
if (acceptedVersions.has(globalVersion)) {
|
|
8017
|
+
return true;
|
|
8018
|
+
}
|
|
8019
|
+
if (rejectedVersions.has(globalVersion)) {
|
|
8020
|
+
return false;
|
|
8021
|
+
}
|
|
8022
|
+
var globalVersionMatch = globalVersion.match(re$1);
|
|
8023
|
+
if (!globalVersionMatch) {
|
|
8024
|
+
return _reject(globalVersion);
|
|
8025
|
+
}
|
|
8026
|
+
var globalVersionParsed = {
|
|
8027
|
+
major: +globalVersionMatch[1],
|
|
8028
|
+
minor: +globalVersionMatch[2],
|
|
8029
|
+
patch: +globalVersionMatch[3],
|
|
8030
|
+
prerelease: globalVersionMatch[4]
|
|
8031
|
+
};
|
|
8032
|
+
if (globalVersionParsed.prerelease != null) {
|
|
8033
|
+
return _reject(globalVersion);
|
|
8034
|
+
}
|
|
8035
|
+
if (ownVersionParsed.major !== globalVersionParsed.major) {
|
|
8036
|
+
return _reject(globalVersion);
|
|
8037
|
+
}
|
|
8038
|
+
if (ownVersionParsed.major === 0) {
|
|
8039
|
+
if (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) {
|
|
8040
|
+
return _accept(globalVersion);
|
|
8041
|
+
}
|
|
8042
|
+
return _reject(globalVersion);
|
|
8043
|
+
}
|
|
8044
|
+
if (ownVersionParsed.minor <= globalVersionParsed.minor) {
|
|
8045
|
+
return _accept(globalVersion);
|
|
8046
|
+
}
|
|
8047
|
+
return _reject(globalVersion);
|
|
8048
|
+
};
|
|
8049
|
+
}
|
|
8050
|
+
var isCompatible = _makeCompatibilityCheck(VERSION);
|
|
8051
|
+
var major = VERSION.split(".")[0];
|
|
8052
|
+
var GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for("opentelemetry.js.api." + major);
|
|
8053
|
+
var _global = _globalThis;
|
|
8054
|
+
function registerGlobal(type, instance, diag, allowOverride) {
|
|
8055
|
+
var _a;
|
|
8056
|
+
if (allowOverride === void 0) {
|
|
8057
|
+
allowOverride = false;
|
|
8058
|
+
}
|
|
8059
|
+
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {
|
|
8060
|
+
version: VERSION
|
|
8061
|
+
};
|
|
8062
|
+
if (!allowOverride && api[type]) {
|
|
8063
|
+
var err = new Error("@opentelemetry/api: Attempted duplicate registration of API: " + type);
|
|
8064
|
+
diag.error(err.stack || err.message);
|
|
8065
|
+
return false;
|
|
8066
|
+
}
|
|
8067
|
+
if (api.version !== VERSION) {
|
|
8068
|
+
var err = new Error("@opentelemetry/api: Registration of version v" + api.version + " for " + type + " does not match previously registered API v" + VERSION);
|
|
8069
|
+
diag.error(err.stack || err.message);
|
|
8070
|
+
return false;
|
|
8071
|
+
}
|
|
8072
|
+
api[type] = instance;
|
|
8073
|
+
diag.debug("@opentelemetry/api: Registered a global for " + type + " v" + VERSION + ".");
|
|
8074
|
+
return true;
|
|
8075
|
+
}
|
|
8076
|
+
function getGlobal(type) {
|
|
8077
|
+
var _a, _b;
|
|
8078
|
+
var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;
|
|
8079
|
+
if (!globalVersion || !isCompatible(globalVersion)) {
|
|
8080
|
+
return;
|
|
8081
|
+
}
|
|
8082
|
+
return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];
|
|
8083
|
+
}
|
|
8084
|
+
function unregisterGlobal(type, diag) {
|
|
8085
|
+
diag.debug("@opentelemetry/api: Unregistering a global for " + type + " v" + VERSION + ".");
|
|
8086
|
+
var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];
|
|
8087
|
+
if (api) {
|
|
8088
|
+
delete api[type];
|
|
8089
|
+
}
|
|
8090
|
+
}
|
|
8091
|
+
var __read$3 = function(o, n) {
|
|
8092
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8093
|
+
if (!m) return o;
|
|
8094
|
+
var i = m.call(o), r2, ar = [], e;
|
|
8095
|
+
try {
|
|
8096
|
+
while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done) ar.push(r2.value);
|
|
8097
|
+
} catch (error) {
|
|
8098
|
+
e = { error };
|
|
8099
|
+
} finally {
|
|
8100
|
+
try {
|
|
8101
|
+
if (r2 && !r2.done && (m = i["return"])) m.call(i);
|
|
8102
|
+
} finally {
|
|
8103
|
+
if (e) throw e.error;
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
return ar;
|
|
8107
|
+
};
|
|
8108
|
+
var __spreadArray$4 = function(to, from, pack) {
|
|
8109
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
8110
|
+
if (ar || !(i in from)) {
|
|
8111
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
8112
|
+
ar[i] = from[i];
|
|
8113
|
+
}
|
|
8114
|
+
}
|
|
8115
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8116
|
+
};
|
|
8117
|
+
var DiagComponentLogger = (
|
|
8118
|
+
/** @class */
|
|
8119
|
+
(function() {
|
|
8120
|
+
function DiagComponentLogger2(props) {
|
|
8121
|
+
this._namespace = props.namespace || "DiagComponentLogger";
|
|
8122
|
+
}
|
|
8123
|
+
DiagComponentLogger2.prototype.debug = function() {
|
|
8124
|
+
var args = [];
|
|
8125
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8126
|
+
args[_i] = arguments[_i];
|
|
8127
|
+
}
|
|
8128
|
+
return logProxy("debug", this._namespace, args);
|
|
8129
|
+
};
|
|
8130
|
+
DiagComponentLogger2.prototype.error = function() {
|
|
8131
|
+
var args = [];
|
|
8132
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8133
|
+
args[_i] = arguments[_i];
|
|
8134
|
+
}
|
|
8135
|
+
return logProxy("error", this._namespace, args);
|
|
8136
|
+
};
|
|
8137
|
+
DiagComponentLogger2.prototype.info = function() {
|
|
8138
|
+
var args = [];
|
|
8139
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8140
|
+
args[_i] = arguments[_i];
|
|
8141
|
+
}
|
|
8142
|
+
return logProxy("info", this._namespace, args);
|
|
8143
|
+
};
|
|
8144
|
+
DiagComponentLogger2.prototype.warn = function() {
|
|
8145
|
+
var args = [];
|
|
8146
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8147
|
+
args[_i] = arguments[_i];
|
|
8148
|
+
}
|
|
8149
|
+
return logProxy("warn", this._namespace, args);
|
|
8150
|
+
};
|
|
8151
|
+
DiagComponentLogger2.prototype.verbose = function() {
|
|
8152
|
+
var args = [];
|
|
8153
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8154
|
+
args[_i] = arguments[_i];
|
|
8155
|
+
}
|
|
8156
|
+
return logProxy("verbose", this._namespace, args);
|
|
8157
|
+
};
|
|
8158
|
+
return DiagComponentLogger2;
|
|
8159
|
+
})()
|
|
8160
|
+
);
|
|
8161
|
+
function logProxy(funcName, namespace, args) {
|
|
8162
|
+
var logger = getGlobal("diag");
|
|
8163
|
+
if (!logger) {
|
|
8164
|
+
return;
|
|
8165
|
+
}
|
|
8166
|
+
args.unshift(namespace);
|
|
8167
|
+
return logger[funcName].apply(logger, __spreadArray$4([], __read$3(args), false));
|
|
8168
|
+
}
|
|
8169
|
+
var DiagLogLevel;
|
|
8170
|
+
(function(DiagLogLevel2) {
|
|
8171
|
+
DiagLogLevel2[DiagLogLevel2["NONE"] = 0] = "NONE";
|
|
8172
|
+
DiagLogLevel2[DiagLogLevel2["ERROR"] = 30] = "ERROR";
|
|
8173
|
+
DiagLogLevel2[DiagLogLevel2["WARN"] = 50] = "WARN";
|
|
8174
|
+
DiagLogLevel2[DiagLogLevel2["INFO"] = 60] = "INFO";
|
|
8175
|
+
DiagLogLevel2[DiagLogLevel2["DEBUG"] = 70] = "DEBUG";
|
|
8176
|
+
DiagLogLevel2[DiagLogLevel2["VERBOSE"] = 80] = "VERBOSE";
|
|
8177
|
+
DiagLogLevel2[DiagLogLevel2["ALL"] = 9999] = "ALL";
|
|
8178
|
+
})(DiagLogLevel || (DiagLogLevel = {}));
|
|
8179
|
+
function createLogLevelDiagLogger(maxLevel, logger) {
|
|
8180
|
+
if (maxLevel < DiagLogLevel.NONE) {
|
|
8181
|
+
maxLevel = DiagLogLevel.NONE;
|
|
8182
|
+
} else if (maxLevel > DiagLogLevel.ALL) {
|
|
8183
|
+
maxLevel = DiagLogLevel.ALL;
|
|
8184
|
+
}
|
|
8185
|
+
logger = logger || {};
|
|
8186
|
+
function _filterFunc(funcName, theLevel) {
|
|
8187
|
+
var theFunc = logger[funcName];
|
|
8188
|
+
if (typeof theFunc === "function" && maxLevel >= theLevel) {
|
|
8189
|
+
return theFunc.bind(logger);
|
|
8190
|
+
}
|
|
8191
|
+
return function() {
|
|
8192
|
+
};
|
|
8193
|
+
}
|
|
8194
|
+
return {
|
|
8195
|
+
error: _filterFunc("error", DiagLogLevel.ERROR),
|
|
8196
|
+
warn: _filterFunc("warn", DiagLogLevel.WARN),
|
|
8197
|
+
info: _filterFunc("info", DiagLogLevel.INFO),
|
|
8198
|
+
debug: _filterFunc("debug", DiagLogLevel.DEBUG),
|
|
8199
|
+
verbose: _filterFunc("verbose", DiagLogLevel.VERBOSE)
|
|
8200
|
+
};
|
|
8201
|
+
}
|
|
8202
|
+
var __read$2 = function(o, n) {
|
|
8203
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8204
|
+
if (!m) return o;
|
|
8205
|
+
var i = m.call(o), r2, ar = [], e;
|
|
8206
|
+
try {
|
|
8207
|
+
while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done) ar.push(r2.value);
|
|
8208
|
+
} catch (error) {
|
|
8209
|
+
e = { error };
|
|
8210
|
+
} finally {
|
|
8211
|
+
try {
|
|
8212
|
+
if (r2 && !r2.done && (m = i["return"])) m.call(i);
|
|
8213
|
+
} finally {
|
|
8214
|
+
if (e) throw e.error;
|
|
8215
|
+
}
|
|
8216
|
+
}
|
|
8217
|
+
return ar;
|
|
8218
|
+
};
|
|
8219
|
+
var __spreadArray$3 = function(to, from, pack) {
|
|
8220
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
8221
|
+
if (ar || !(i in from)) {
|
|
8222
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
8223
|
+
ar[i] = from[i];
|
|
8224
|
+
}
|
|
8225
|
+
}
|
|
8226
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8227
|
+
};
|
|
8228
|
+
var API_NAME$2 = "diag";
|
|
8229
|
+
var DiagAPI = (
|
|
8230
|
+
/** @class */
|
|
8231
|
+
(function() {
|
|
8232
|
+
function DiagAPI2() {
|
|
8233
|
+
function _logProxy(funcName) {
|
|
8234
|
+
return function() {
|
|
8235
|
+
var args = [];
|
|
8236
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
8237
|
+
args[_i] = arguments[_i];
|
|
8238
|
+
}
|
|
8239
|
+
var logger = getGlobal("diag");
|
|
8240
|
+
if (!logger)
|
|
8241
|
+
return;
|
|
8242
|
+
return logger[funcName].apply(logger, __spreadArray$3([], __read$2(args), false));
|
|
8243
|
+
};
|
|
8244
|
+
}
|
|
8245
|
+
var self2 = this;
|
|
8246
|
+
var setLogger = function(logger, optionsOrLogLevel) {
|
|
8247
|
+
var _a, _b, _c;
|
|
8248
|
+
if (optionsOrLogLevel === void 0) {
|
|
8249
|
+
optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };
|
|
8250
|
+
}
|
|
8251
|
+
if (logger === self2) {
|
|
8252
|
+
var err = new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");
|
|
8253
|
+
self2.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);
|
|
8254
|
+
return false;
|
|
8255
|
+
}
|
|
8256
|
+
if (typeof optionsOrLogLevel === "number") {
|
|
8257
|
+
optionsOrLogLevel = {
|
|
8258
|
+
logLevel: optionsOrLogLevel
|
|
8259
|
+
};
|
|
8260
|
+
}
|
|
8261
|
+
var oldLogger = getGlobal("diag");
|
|
8262
|
+
var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);
|
|
8263
|
+
if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {
|
|
8264
|
+
var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : "<failed to generate stacktrace>";
|
|
8265
|
+
oldLogger.warn("Current logger will be overwritten from " + stack);
|
|
8266
|
+
newLogger.warn("Current logger will overwrite one already registered from " + stack);
|
|
8267
|
+
}
|
|
8268
|
+
return registerGlobal("diag", newLogger, self2, true);
|
|
8269
|
+
};
|
|
8270
|
+
self2.setLogger = setLogger;
|
|
8271
|
+
self2.disable = function() {
|
|
8272
|
+
unregisterGlobal(API_NAME$2, self2);
|
|
8273
|
+
};
|
|
8274
|
+
self2.createComponentLogger = function(options) {
|
|
8275
|
+
return new DiagComponentLogger(options);
|
|
8276
|
+
};
|
|
8277
|
+
self2.verbose = _logProxy("verbose");
|
|
8278
|
+
self2.debug = _logProxy("debug");
|
|
8279
|
+
self2.info = _logProxy("info");
|
|
8280
|
+
self2.warn = _logProxy("warn");
|
|
8281
|
+
self2.error = _logProxy("error");
|
|
8282
|
+
}
|
|
8283
|
+
DiagAPI2.instance = function() {
|
|
8284
|
+
if (!this._instance) {
|
|
8285
|
+
this._instance = new DiagAPI2();
|
|
8286
|
+
}
|
|
8287
|
+
return this._instance;
|
|
8288
|
+
};
|
|
8289
|
+
return DiagAPI2;
|
|
8290
|
+
})()
|
|
8291
|
+
);
|
|
8292
|
+
function createContextKey(description) {
|
|
8293
|
+
return Symbol.for(description);
|
|
8294
|
+
}
|
|
8295
|
+
var BaseContext = (
|
|
8296
|
+
/** @class */
|
|
8297
|
+
/* @__PURE__ */ (function() {
|
|
8298
|
+
function BaseContext2(parentContext) {
|
|
8299
|
+
var self2 = this;
|
|
8300
|
+
self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
|
|
8301
|
+
self2.getValue = function(key2) {
|
|
8302
|
+
return self2._currentContext.get(key2);
|
|
8303
|
+
};
|
|
8304
|
+
self2.setValue = function(key2, value) {
|
|
8305
|
+
var context2 = new BaseContext2(self2._currentContext);
|
|
8306
|
+
context2._currentContext.set(key2, value);
|
|
8307
|
+
return context2;
|
|
8308
|
+
};
|
|
8309
|
+
self2.deleteValue = function(key2) {
|
|
8310
|
+
var context2 = new BaseContext2(self2._currentContext);
|
|
8311
|
+
context2._currentContext.delete(key2);
|
|
8312
|
+
return context2;
|
|
8313
|
+
};
|
|
8314
|
+
}
|
|
8315
|
+
return BaseContext2;
|
|
8316
|
+
})()
|
|
8317
|
+
);
|
|
8318
|
+
var ROOT_CONTEXT = new BaseContext();
|
|
8319
|
+
var __read$1 = function(o, n) {
|
|
8320
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8321
|
+
if (!m) return o;
|
|
8322
|
+
var i = m.call(o), r2, ar = [], e;
|
|
8323
|
+
try {
|
|
8324
|
+
while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done) ar.push(r2.value);
|
|
8325
|
+
} catch (error) {
|
|
8326
|
+
e = { error };
|
|
8327
|
+
} finally {
|
|
8328
|
+
try {
|
|
8329
|
+
if (r2 && !r2.done && (m = i["return"])) m.call(i);
|
|
8330
|
+
} finally {
|
|
8331
|
+
if (e) throw e.error;
|
|
8332
|
+
}
|
|
8333
|
+
}
|
|
8334
|
+
return ar;
|
|
8335
|
+
};
|
|
8336
|
+
var __spreadArray$2 = function(to, from, pack) {
|
|
8337
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
8338
|
+
if (ar || !(i in from)) {
|
|
8339
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
8340
|
+
ar[i] = from[i];
|
|
8341
|
+
}
|
|
8342
|
+
}
|
|
8343
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8344
|
+
};
|
|
8345
|
+
var NoopContextManager = (
|
|
8346
|
+
/** @class */
|
|
8347
|
+
(function() {
|
|
8348
|
+
function NoopContextManager2() {
|
|
8349
|
+
}
|
|
8350
|
+
NoopContextManager2.prototype.active = function() {
|
|
8351
|
+
return ROOT_CONTEXT;
|
|
8352
|
+
};
|
|
8353
|
+
NoopContextManager2.prototype.with = function(_context, fn, thisArg) {
|
|
8354
|
+
var args = [];
|
|
8355
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
8356
|
+
args[_i - 3] = arguments[_i];
|
|
8357
|
+
}
|
|
8358
|
+
return fn.call.apply(fn, __spreadArray$2([thisArg], __read$1(args), false));
|
|
8359
|
+
};
|
|
8360
|
+
NoopContextManager2.prototype.bind = function(_context, target) {
|
|
8361
|
+
return target;
|
|
8362
|
+
};
|
|
8363
|
+
NoopContextManager2.prototype.enable = function() {
|
|
8364
|
+
return this;
|
|
8365
|
+
};
|
|
8366
|
+
NoopContextManager2.prototype.disable = function() {
|
|
8367
|
+
return this;
|
|
8368
|
+
};
|
|
8369
|
+
return NoopContextManager2;
|
|
8370
|
+
})()
|
|
8371
|
+
);
|
|
8372
|
+
var __read = function(o, n) {
|
|
8373
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
8374
|
+
if (!m) return o;
|
|
8375
|
+
var i = m.call(o), r2, ar = [], e;
|
|
8376
|
+
try {
|
|
8377
|
+
while ((n === void 0 || n-- > 0) && !(r2 = i.next()).done) ar.push(r2.value);
|
|
8378
|
+
} catch (error) {
|
|
8379
|
+
e = { error };
|
|
8380
|
+
} finally {
|
|
8381
|
+
try {
|
|
8382
|
+
if (r2 && !r2.done && (m = i["return"])) m.call(i);
|
|
8383
|
+
} finally {
|
|
8384
|
+
if (e) throw e.error;
|
|
8385
|
+
}
|
|
8386
|
+
}
|
|
8387
|
+
return ar;
|
|
8388
|
+
};
|
|
8389
|
+
var __spreadArray$1 = function(to, from, pack) {
|
|
8390
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
8391
|
+
if (ar || !(i in from)) {
|
|
8392
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
8393
|
+
ar[i] = from[i];
|
|
8394
|
+
}
|
|
8395
|
+
}
|
|
8396
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
8397
|
+
};
|
|
8398
|
+
var API_NAME$1 = "context";
|
|
8399
|
+
var NOOP_CONTEXT_MANAGER = new NoopContextManager();
|
|
8400
|
+
var ContextAPI = (
|
|
8401
|
+
/** @class */
|
|
8402
|
+
(function() {
|
|
8403
|
+
function ContextAPI2() {
|
|
8404
|
+
}
|
|
8405
|
+
ContextAPI2.getInstance = function() {
|
|
8406
|
+
if (!this._instance) {
|
|
8407
|
+
this._instance = new ContextAPI2();
|
|
8408
|
+
}
|
|
8409
|
+
return this._instance;
|
|
8410
|
+
};
|
|
8411
|
+
ContextAPI2.prototype.setGlobalContextManager = function(contextManager) {
|
|
8412
|
+
return registerGlobal(API_NAME$1, contextManager, DiagAPI.instance());
|
|
8413
|
+
};
|
|
8414
|
+
ContextAPI2.prototype.active = function() {
|
|
8415
|
+
return this._getContextManager().active();
|
|
8416
|
+
};
|
|
8417
|
+
ContextAPI2.prototype.with = function(context2, fn, thisArg) {
|
|
8418
|
+
var _a;
|
|
8419
|
+
var args = [];
|
|
8420
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
8421
|
+
args[_i - 3] = arguments[_i];
|
|
8422
|
+
}
|
|
8423
|
+
return (_a = this._getContextManager()).with.apply(_a, __spreadArray$1([context2, fn, thisArg], __read(args), false));
|
|
8424
|
+
};
|
|
8425
|
+
ContextAPI2.prototype.bind = function(context2, target) {
|
|
8426
|
+
return this._getContextManager().bind(context2, target);
|
|
8427
|
+
};
|
|
8428
|
+
ContextAPI2.prototype._getContextManager = function() {
|
|
8429
|
+
return getGlobal(API_NAME$1) || NOOP_CONTEXT_MANAGER;
|
|
8430
|
+
};
|
|
8431
|
+
ContextAPI2.prototype.disable = function() {
|
|
8432
|
+
this._getContextManager().disable();
|
|
8433
|
+
unregisterGlobal(API_NAME$1, DiagAPI.instance());
|
|
8434
|
+
};
|
|
8435
|
+
return ContextAPI2;
|
|
8436
|
+
})()
|
|
8437
|
+
);
|
|
8438
|
+
var TraceFlags;
|
|
8439
|
+
(function(TraceFlags2) {
|
|
8440
|
+
TraceFlags2[TraceFlags2["NONE"] = 0] = "NONE";
|
|
8441
|
+
TraceFlags2[TraceFlags2["SAMPLED"] = 1] = "SAMPLED";
|
|
8442
|
+
})(TraceFlags || (TraceFlags = {}));
|
|
8443
|
+
var INVALID_SPANID = "0000000000000000";
|
|
8444
|
+
var INVALID_TRACEID = "00000000000000000000000000000000";
|
|
8445
|
+
var INVALID_SPAN_CONTEXT = {
|
|
8446
|
+
traceId: INVALID_TRACEID,
|
|
8447
|
+
spanId: INVALID_SPANID,
|
|
8448
|
+
traceFlags: TraceFlags.NONE
|
|
8449
|
+
};
|
|
8450
|
+
var NonRecordingSpan = (
|
|
8451
|
+
/** @class */
|
|
8452
|
+
(function() {
|
|
8453
|
+
function NonRecordingSpan2(_spanContext) {
|
|
8454
|
+
if (_spanContext === void 0) {
|
|
8455
|
+
_spanContext = INVALID_SPAN_CONTEXT;
|
|
8456
|
+
}
|
|
8457
|
+
this._spanContext = _spanContext;
|
|
8458
|
+
}
|
|
8459
|
+
NonRecordingSpan2.prototype.spanContext = function() {
|
|
8460
|
+
return this._spanContext;
|
|
8461
|
+
};
|
|
8462
|
+
NonRecordingSpan2.prototype.setAttribute = function(_key, _value) {
|
|
8463
|
+
return this;
|
|
8464
|
+
};
|
|
8465
|
+
NonRecordingSpan2.prototype.setAttributes = function(_attributes) {
|
|
8466
|
+
return this;
|
|
8467
|
+
};
|
|
8468
|
+
NonRecordingSpan2.prototype.addEvent = function(_name, _attributes) {
|
|
8469
|
+
return this;
|
|
8470
|
+
};
|
|
8471
|
+
NonRecordingSpan2.prototype.addLink = function(_link) {
|
|
8472
|
+
return this;
|
|
8473
|
+
};
|
|
8474
|
+
NonRecordingSpan2.prototype.addLinks = function(_links) {
|
|
8475
|
+
return this;
|
|
8476
|
+
};
|
|
8477
|
+
NonRecordingSpan2.prototype.setStatus = function(_status) {
|
|
8478
|
+
return this;
|
|
8479
|
+
};
|
|
8480
|
+
NonRecordingSpan2.prototype.updateName = function(_name) {
|
|
8481
|
+
return this;
|
|
8482
|
+
};
|
|
8483
|
+
NonRecordingSpan2.prototype.end = function(_endTime) {
|
|
8484
|
+
};
|
|
8485
|
+
NonRecordingSpan2.prototype.isRecording = function() {
|
|
8486
|
+
return false;
|
|
8487
|
+
};
|
|
8488
|
+
NonRecordingSpan2.prototype.recordException = function(_exception, _time) {
|
|
8489
|
+
};
|
|
8490
|
+
return NonRecordingSpan2;
|
|
8491
|
+
})()
|
|
8492
|
+
);
|
|
8493
|
+
var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
|
|
8494
|
+
function getSpan(context2) {
|
|
8495
|
+
return context2.getValue(SPAN_KEY) || void 0;
|
|
8496
|
+
}
|
|
8497
|
+
function getActiveSpan$1() {
|
|
8498
|
+
return getSpan(ContextAPI.getInstance().active());
|
|
8499
|
+
}
|
|
8500
|
+
function setSpan(context2, span) {
|
|
8501
|
+
return context2.setValue(SPAN_KEY, span);
|
|
8502
|
+
}
|
|
8503
|
+
function deleteSpan(context2) {
|
|
8504
|
+
return context2.deleteValue(SPAN_KEY);
|
|
8505
|
+
}
|
|
8506
|
+
function setSpanContext(context2, spanContext) {
|
|
8507
|
+
return setSpan(context2, new NonRecordingSpan(spanContext));
|
|
8508
|
+
}
|
|
8509
|
+
function getSpanContext(context2) {
|
|
8510
|
+
var _a;
|
|
8511
|
+
return (_a = getSpan(context2)) === null || _a === void 0 ? void 0 : _a.spanContext();
|
|
8512
|
+
}
|
|
8513
|
+
var VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;
|
|
8514
|
+
var VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;
|
|
8515
|
+
function isValidTraceId(traceId) {
|
|
8516
|
+
return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;
|
|
8517
|
+
}
|
|
8518
|
+
function isValidSpanId(spanId) {
|
|
8519
|
+
return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;
|
|
8520
|
+
}
|
|
8521
|
+
function isSpanContextValid(spanContext) {
|
|
8522
|
+
return isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);
|
|
8523
|
+
}
|
|
8524
|
+
function wrapSpanContext(spanContext) {
|
|
8525
|
+
return new NonRecordingSpan(spanContext);
|
|
8526
|
+
}
|
|
8527
|
+
var contextApi = ContextAPI.getInstance();
|
|
8528
|
+
var NoopTracer = (
|
|
8529
|
+
/** @class */
|
|
8530
|
+
(function() {
|
|
8531
|
+
function NoopTracer2() {
|
|
8532
|
+
}
|
|
8533
|
+
NoopTracer2.prototype.startSpan = function(name2, options, context2) {
|
|
8534
|
+
if (context2 === void 0) {
|
|
8535
|
+
context2 = contextApi.active();
|
|
8536
|
+
}
|
|
8537
|
+
var root2 = Boolean(options === null || options === void 0 ? void 0 : options.root);
|
|
8538
|
+
if (root2) {
|
|
8539
|
+
return new NonRecordingSpan();
|
|
8540
|
+
}
|
|
8541
|
+
var parentFromContext = context2 && getSpanContext(context2);
|
|
8542
|
+
if (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) {
|
|
8543
|
+
return new NonRecordingSpan(parentFromContext);
|
|
8544
|
+
} else {
|
|
8545
|
+
return new NonRecordingSpan();
|
|
8546
|
+
}
|
|
8547
|
+
};
|
|
8548
|
+
NoopTracer2.prototype.startActiveSpan = function(name2, arg2, arg3, arg4) {
|
|
8549
|
+
var opts;
|
|
8550
|
+
var ctx;
|
|
8551
|
+
var fn;
|
|
8552
|
+
if (arguments.length < 2) {
|
|
8553
|
+
return;
|
|
8554
|
+
} else if (arguments.length === 2) {
|
|
8555
|
+
fn = arg2;
|
|
8556
|
+
} else if (arguments.length === 3) {
|
|
8557
|
+
opts = arg2;
|
|
8558
|
+
fn = arg3;
|
|
8559
|
+
} else {
|
|
8560
|
+
opts = arg2;
|
|
8561
|
+
ctx = arg3;
|
|
8562
|
+
fn = arg4;
|
|
8563
|
+
}
|
|
8564
|
+
var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();
|
|
8565
|
+
var span = this.startSpan(name2, opts, parentContext);
|
|
8566
|
+
var contextWithSpanSet = setSpan(parentContext, span);
|
|
8567
|
+
return contextApi.with(contextWithSpanSet, fn, void 0, span);
|
|
8568
|
+
};
|
|
8569
|
+
return NoopTracer2;
|
|
8570
|
+
})()
|
|
8571
|
+
);
|
|
8572
|
+
function isSpanContext(spanContext) {
|
|
8573
|
+
return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
|
|
8574
|
+
}
|
|
8575
|
+
var NOOP_TRACER = new NoopTracer();
|
|
8576
|
+
var ProxyTracer = (
|
|
8577
|
+
/** @class */
|
|
8578
|
+
(function() {
|
|
8579
|
+
function ProxyTracer2(_provider, name2, version, options) {
|
|
8580
|
+
this._provider = _provider;
|
|
8581
|
+
this.name = name2;
|
|
8582
|
+
this.version = version;
|
|
8583
|
+
this.options = options;
|
|
8584
|
+
}
|
|
8585
|
+
ProxyTracer2.prototype.startSpan = function(name2, options, context2) {
|
|
8586
|
+
return this._getTracer().startSpan(name2, options, context2);
|
|
8587
|
+
};
|
|
8588
|
+
ProxyTracer2.prototype.startActiveSpan = function(_name, _options, _context, _fn) {
|
|
8589
|
+
var tracer = this._getTracer();
|
|
8590
|
+
return Reflect.apply(tracer.startActiveSpan, tracer, arguments);
|
|
8591
|
+
};
|
|
8592
|
+
ProxyTracer2.prototype._getTracer = function() {
|
|
8593
|
+
if (this._delegate) {
|
|
8594
|
+
return this._delegate;
|
|
8595
|
+
}
|
|
8596
|
+
var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);
|
|
8597
|
+
if (!tracer) {
|
|
8598
|
+
return NOOP_TRACER;
|
|
8599
|
+
}
|
|
8600
|
+
this._delegate = tracer;
|
|
8601
|
+
return this._delegate;
|
|
8602
|
+
};
|
|
8603
|
+
return ProxyTracer2;
|
|
8604
|
+
})()
|
|
8605
|
+
);
|
|
8606
|
+
var NoopTracerProvider = (
|
|
8607
|
+
/** @class */
|
|
8608
|
+
(function() {
|
|
8609
|
+
function NoopTracerProvider2() {
|
|
8610
|
+
}
|
|
8611
|
+
NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) {
|
|
8612
|
+
return new NoopTracer();
|
|
8613
|
+
};
|
|
8614
|
+
return NoopTracerProvider2;
|
|
8615
|
+
})()
|
|
8616
|
+
);
|
|
8617
|
+
var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
8618
|
+
var ProxyTracerProvider = (
|
|
8619
|
+
/** @class */
|
|
8620
|
+
(function() {
|
|
8621
|
+
function ProxyTracerProvider2() {
|
|
8622
|
+
}
|
|
8623
|
+
ProxyTracerProvider2.prototype.getTracer = function(name2, version, options) {
|
|
8624
|
+
var _a;
|
|
8625
|
+
return (_a = this.getDelegateTracer(name2, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name2, version, options);
|
|
8626
|
+
};
|
|
8627
|
+
ProxyTracerProvider2.prototype.getDelegate = function() {
|
|
8628
|
+
var _a;
|
|
8629
|
+
return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;
|
|
8630
|
+
};
|
|
8631
|
+
ProxyTracerProvider2.prototype.setDelegate = function(delegate) {
|
|
8632
|
+
this._delegate = delegate;
|
|
8633
|
+
};
|
|
8634
|
+
ProxyTracerProvider2.prototype.getDelegateTracer = function(name2, version, options) {
|
|
8635
|
+
var _a;
|
|
8636
|
+
return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name2, version, options);
|
|
8637
|
+
};
|
|
8638
|
+
return ProxyTracerProvider2;
|
|
8639
|
+
})()
|
|
8640
|
+
);
|
|
8641
|
+
var SpanStatusCode;
|
|
8642
|
+
(function(SpanStatusCode2) {
|
|
8643
|
+
SpanStatusCode2[SpanStatusCode2["UNSET"] = 0] = "UNSET";
|
|
8644
|
+
SpanStatusCode2[SpanStatusCode2["OK"] = 1] = "OK";
|
|
8645
|
+
SpanStatusCode2[SpanStatusCode2["ERROR"] = 2] = "ERROR";
|
|
8646
|
+
})(SpanStatusCode || (SpanStatusCode = {}));
|
|
8647
|
+
var context = ContextAPI.getInstance();
|
|
8648
|
+
var API_NAME = "trace";
|
|
8649
|
+
var TraceAPI = (
|
|
8650
|
+
/** @class */
|
|
8651
|
+
(function() {
|
|
8652
|
+
function TraceAPI2() {
|
|
8653
|
+
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
8654
|
+
this.wrapSpanContext = wrapSpanContext;
|
|
8655
|
+
this.isSpanContextValid = isSpanContextValid;
|
|
8656
|
+
this.deleteSpan = deleteSpan;
|
|
8657
|
+
this.getSpan = getSpan;
|
|
8658
|
+
this.getActiveSpan = getActiveSpan$1;
|
|
8659
|
+
this.getSpanContext = getSpanContext;
|
|
8660
|
+
this.setSpan = setSpan;
|
|
8661
|
+
this.setSpanContext = setSpanContext;
|
|
8662
|
+
}
|
|
8663
|
+
TraceAPI2.getInstance = function() {
|
|
8664
|
+
if (!this._instance) {
|
|
8665
|
+
this._instance = new TraceAPI2();
|
|
8666
|
+
}
|
|
8667
|
+
return this._instance;
|
|
8668
|
+
};
|
|
8669
|
+
TraceAPI2.prototype.setGlobalTracerProvider = function(provider) {
|
|
8670
|
+
var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());
|
|
8671
|
+
if (success) {
|
|
8672
|
+
this._proxyTracerProvider.setDelegate(provider);
|
|
8673
|
+
}
|
|
8674
|
+
return success;
|
|
8675
|
+
};
|
|
8676
|
+
TraceAPI2.prototype.getTracerProvider = function() {
|
|
8677
|
+
return getGlobal(API_NAME) || this._proxyTracerProvider;
|
|
8678
|
+
};
|
|
8679
|
+
TraceAPI2.prototype.getTracer = function(name2, version) {
|
|
8680
|
+
return this.getTracerProvider().getTracer(name2, version);
|
|
8681
|
+
};
|
|
8682
|
+
TraceAPI2.prototype.disable = function() {
|
|
8683
|
+
unregisterGlobal(API_NAME, DiagAPI.instance());
|
|
8684
|
+
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
8685
|
+
};
|
|
8686
|
+
return TraceAPI2;
|
|
8687
|
+
})()
|
|
8688
|
+
);
|
|
8689
|
+
var trace = TraceAPI.getInstance();
|
|
8690
|
+
const PACKAGE_VERSION = "1.0.41";
|
|
8691
|
+
const TRACER_NAME = "@industry-theme/backlogmd-kanban-panel";
|
|
8692
|
+
const TRACER_VERSION = PACKAGE_VERSION;
|
|
8693
|
+
function getTracer() {
|
|
8694
|
+
return trace.getTracer(TRACER_NAME, TRACER_VERSION);
|
|
8695
|
+
}
|
|
8696
|
+
function getActiveSpan() {
|
|
8697
|
+
return trace.getActiveSpan();
|
|
8698
|
+
}
|
|
8699
|
+
async function withSpan(span, fn) {
|
|
8700
|
+
return context.with(trace.setSpan(context.active(), span), fn);
|
|
8701
|
+
}
|
|
7984
8702
|
const STATUS_COLUMNS = [
|
|
7985
8703
|
DEFAULT_TASK_STATUSES.TODO,
|
|
7986
8704
|
DEFAULT_TASK_STATUSES.IN_PROGRESS,
|
|
@@ -7989,7 +8707,7 @@ const STATUS_COLUMNS = [
|
|
|
7989
8707
|
const DEFAULT_TASKS_LIMIT = 20;
|
|
7990
8708
|
function useKanbanData(options) {
|
|
7991
8709
|
const {
|
|
7992
|
-
context,
|
|
8710
|
+
context: context2,
|
|
7993
8711
|
actions,
|
|
7994
8712
|
tasksLimit = DEFAULT_TASKS_LIMIT,
|
|
7995
8713
|
events: events2
|
|
@@ -8008,12 +8726,12 @@ function useKanbanData(options) {
|
|
|
8008
8726
|
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
8009
8727
|
const coreRef = useRef(null);
|
|
8010
8728
|
const activeFilePathRef = useRef(null);
|
|
8011
|
-
const contextRef = useRef(
|
|
8729
|
+
const contextRef = useRef(context2);
|
|
8012
8730
|
const actionsRef = useRef(actions);
|
|
8013
8731
|
useEffect(() => {
|
|
8014
|
-
contextRef.current =
|
|
8732
|
+
contextRef.current = context2;
|
|
8015
8733
|
actionsRef.current = actions;
|
|
8016
|
-
}, [
|
|
8734
|
+
}, [context2, actions]);
|
|
8017
8735
|
const fetchFileContent = useCallback(async (path2) => {
|
|
8018
8736
|
var _a;
|
|
8019
8737
|
const currentContext = contextRef.current;
|
|
@@ -8049,8 +8767,12 @@ function useKanbanData(options) {
|
|
|
8049
8767
|
return newColumnStates;
|
|
8050
8768
|
}, []);
|
|
8051
8769
|
const loadBacklogData = useCallback(async () => {
|
|
8052
|
-
var _a, _b
|
|
8053
|
-
|
|
8770
|
+
var _a, _b;
|
|
8771
|
+
const tracer = getTracer();
|
|
8772
|
+
const span = tracer.startSpan("kanban.load");
|
|
8773
|
+
const startTime = Date.now();
|
|
8774
|
+
span.addEvent("kanban.loading");
|
|
8775
|
+
if (!context2 || !actions) {
|
|
8054
8776
|
console.log("[useKanbanData] No context provided");
|
|
8055
8777
|
setIsBacklogProject(false);
|
|
8056
8778
|
setTasks([]);
|
|
@@ -8058,9 +8780,12 @@ function useKanbanData(options) {
|
|
|
8058
8780
|
setIsLoading(false);
|
|
8059
8781
|
coreRef.current = null;
|
|
8060
8782
|
fileTreeVersionRef.current = null;
|
|
8783
|
+
span.setAttributes({ "output.skipped": true, "output.reason": "no_context" });
|
|
8784
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8785
|
+
span.end();
|
|
8061
8786
|
return;
|
|
8062
8787
|
}
|
|
8063
|
-
const fileTreeSlice =
|
|
8788
|
+
const fileTreeSlice = context2.fileTree;
|
|
8064
8789
|
if (!((_a = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _a.allFiles)) {
|
|
8065
8790
|
console.log("[useKanbanData] FileTree not available");
|
|
8066
8791
|
setIsBacklogProject(false);
|
|
@@ -8068,79 +8793,115 @@ function useKanbanData(options) {
|
|
|
8068
8793
|
setColumnStates(/* @__PURE__ */ new Map());
|
|
8069
8794
|
coreRef.current = null;
|
|
8070
8795
|
fileTreeVersionRef.current = null;
|
|
8796
|
+
span.setAttributes({ "output.skipped": true, "output.reason": "no_filetree" });
|
|
8797
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8798
|
+
span.end();
|
|
8071
8799
|
return;
|
|
8072
8800
|
}
|
|
8073
8801
|
const currentVersion = fileTreeSlice.data.sha || ((_b = fileTreeSlice.data.metadata) == null ? void 0 : _b.sourceSha) || "unknown";
|
|
8074
8802
|
if (coreRef.current && fileTreeVersionRef.current === currentVersion) {
|
|
8075
8803
|
console.log("[useKanbanData] Data already loaded for this file tree version, skipping");
|
|
8076
8804
|
setIsLoading(false);
|
|
8805
|
+
span.setAttributes({ "output.skipped": true, "output.reason": "already_loaded" });
|
|
8806
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8807
|
+
span.end();
|
|
8077
8808
|
return;
|
|
8078
8809
|
}
|
|
8079
8810
|
setIsLoading(true);
|
|
8080
8811
|
setError(null);
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
|
|
8089
|
-
|
|
8090
|
-
|
|
8091
|
-
|
|
8092
|
-
|
|
8093
|
-
|
|
8094
|
-
|
|
8095
|
-
|
|
8812
|
+
const files = fileTreeSlice.data.allFiles;
|
|
8813
|
+
const filePaths = files.map((f) => f.path);
|
|
8814
|
+
return withSpan(span, async () => {
|
|
8815
|
+
var _a2;
|
|
8816
|
+
try {
|
|
8817
|
+
const fs = new PanelFileSystemAdapter({
|
|
8818
|
+
fetchFile: fetchFileContent,
|
|
8819
|
+
filePaths,
|
|
8820
|
+
hostFileSystem: (_a2 = context2.adapters) == null ? void 0 : _a2.fileSystem
|
|
8821
|
+
});
|
|
8822
|
+
const core2 = new Core({
|
|
8823
|
+
projectRoot: "",
|
|
8824
|
+
adapters: { fs }
|
|
8825
|
+
});
|
|
8826
|
+
const isProject = await core2.isBacklogProject();
|
|
8827
|
+
if (!isProject) {
|
|
8828
|
+
console.log("[useKanbanData] Not a Backlog.md project");
|
|
8829
|
+
setIsBacklogProject(false);
|
|
8830
|
+
setTasks([]);
|
|
8831
|
+
setColumnStates(/* @__PURE__ */ new Map());
|
|
8832
|
+
coreRef.current = null;
|
|
8833
|
+
span.setAttributes({
|
|
8834
|
+
"output.isBacklogProject": false,
|
|
8835
|
+
"duration.ms": Date.now() - startTime
|
|
8836
|
+
});
|
|
8837
|
+
span.addEvent("kanban.loaded", { "tasks.count": 0, "is.backlog.project": false });
|
|
8838
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8839
|
+
return;
|
|
8840
|
+
}
|
|
8841
|
+
console.log("[useKanbanData] Loading Backlog.md data with lazy loading...");
|
|
8842
|
+
setIsBacklogProject(true);
|
|
8843
|
+
setCanWrite(fs.canWrite);
|
|
8844
|
+
await core2.initializeLazy(filePaths);
|
|
8845
|
+
coreRef.current = core2;
|
|
8846
|
+
const paginatedResult = await core2.loadMoreForSource("tasks", 0, {
|
|
8847
|
+
limit: tasksLimit,
|
|
8848
|
+
sortDirection: "asc"
|
|
8849
|
+
});
|
|
8850
|
+
const allTasks = paginatedResult.items;
|
|
8851
|
+
const total = paginatedResult.total;
|
|
8852
|
+
console.log(
|
|
8853
|
+
`[useKanbanData] Loaded ${allTasks.length}/${total} tasks`
|
|
8854
|
+
);
|
|
8855
|
+
if (allTasks.length > 0) {
|
|
8856
|
+
console.log("[useKanbanData] First task sample:", {
|
|
8857
|
+
id: allTasks[0].id,
|
|
8858
|
+
title: allTasks[0].title,
|
|
8859
|
+
status: allTasks[0].status,
|
|
8860
|
+
description: allTasks[0].description,
|
|
8861
|
+
filePath: allTasks[0].filePath
|
|
8862
|
+
});
|
|
8863
|
+
}
|
|
8864
|
+
fileTreeVersionRef.current = currentVersion;
|
|
8865
|
+
const newColumnStates = buildColumnStates(allTasks);
|
|
8866
|
+
setTasks(allTasks);
|
|
8867
|
+
setColumnStates(newColumnStates);
|
|
8868
|
+
setTotalLoaded(allTasks.length);
|
|
8869
|
+
setTotalCount(total);
|
|
8870
|
+
setHasMore(paginatedResult.hasMore);
|
|
8871
|
+
span.addEvent("kanban.loaded", {
|
|
8872
|
+
"tasks.count": allTasks.length,
|
|
8873
|
+
"tasks.total": total,
|
|
8874
|
+
"tasks.hasMore": paginatedResult.hasMore
|
|
8875
|
+
});
|
|
8876
|
+
span.setAttributes({
|
|
8877
|
+
"output.isBacklogProject": true,
|
|
8878
|
+
"output.tasksLoaded": allTasks.length,
|
|
8879
|
+
"output.tasksTotal": total,
|
|
8880
|
+
"output.hasMore": paginatedResult.hasMore,
|
|
8881
|
+
"duration.ms": Date.now() - startTime
|
|
8882
|
+
});
|
|
8883
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8884
|
+
} catch (err) {
|
|
8885
|
+
console.error("[useKanbanData] Failed to load Backlog.md data:", err);
|
|
8886
|
+
const errorMessage = err instanceof Error ? err.message : "Failed to load backlog data";
|
|
8887
|
+
setError(errorMessage);
|
|
8096
8888
|
setIsBacklogProject(false);
|
|
8097
8889
|
setTasks([]);
|
|
8098
8890
|
setColumnStates(/* @__PURE__ */ new Map());
|
|
8099
8891
|
coreRef.current = null;
|
|
8100
|
-
|
|
8101
|
-
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
setCanWrite(fs.canWrite);
|
|
8105
|
-
await core2.initializeLazy(filePaths);
|
|
8106
|
-
coreRef.current = core2;
|
|
8107
|
-
const paginatedResult = await core2.loadMoreForSource("tasks", 0, {
|
|
8108
|
-
limit: tasksLimit,
|
|
8109
|
-
sortDirection: "asc"
|
|
8110
|
-
});
|
|
8111
|
-
const allTasks = paginatedResult.items;
|
|
8112
|
-
const total = paginatedResult.total;
|
|
8113
|
-
console.log(
|
|
8114
|
-
`[useKanbanData] Loaded ${allTasks.length}/${total} tasks`
|
|
8115
|
-
);
|
|
8116
|
-
if (allTasks.length > 0) {
|
|
8117
|
-
console.log("[useKanbanData] First task sample:", {
|
|
8118
|
-
id: allTasks[0].id,
|
|
8119
|
-
title: allTasks[0].title,
|
|
8120
|
-
status: allTasks[0].status,
|
|
8121
|
-
description: allTasks[0].description,
|
|
8122
|
-
filePath: allTasks[0].filePath
|
|
8892
|
+
fileTreeVersionRef.current = null;
|
|
8893
|
+
span.addEvent("kanban.load.error", {
|
|
8894
|
+
"error.type": err instanceof Error ? err.name : "Unknown",
|
|
8895
|
+
"error.message": errorMessage
|
|
8123
8896
|
});
|
|
8897
|
+
span.recordException(err);
|
|
8898
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: errorMessage });
|
|
8899
|
+
} finally {
|
|
8900
|
+
setIsLoading(false);
|
|
8901
|
+
span.end();
|
|
8124
8902
|
}
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
setTasks(allTasks);
|
|
8128
|
-
setColumnStates(newColumnStates);
|
|
8129
|
-
setTotalLoaded(allTasks.length);
|
|
8130
|
-
setTotalCount(total);
|
|
8131
|
-
setHasMore(paginatedResult.hasMore);
|
|
8132
|
-
} catch (err) {
|
|
8133
|
-
console.error("[useKanbanData] Failed to load Backlog.md data:", err);
|
|
8134
|
-
setError(err instanceof Error ? err.message : "Failed to load backlog data");
|
|
8135
|
-
setIsBacklogProject(false);
|
|
8136
|
-
setTasks([]);
|
|
8137
|
-
setColumnStates(/* @__PURE__ */ new Map());
|
|
8138
|
-
coreRef.current = null;
|
|
8139
|
-
fileTreeVersionRef.current = null;
|
|
8140
|
-
} finally {
|
|
8141
|
-
setIsLoading(false);
|
|
8142
|
-
}
|
|
8143
|
-
}, [context, actions, fetchFileContent, tasksLimit, buildColumnStates]);
|
|
8903
|
+
});
|
|
8904
|
+
}, [context2, actions, fetchFileContent, tasksLimit, buildColumnStates]);
|
|
8144
8905
|
useEffect(() => {
|
|
8145
8906
|
loadBacklogData();
|
|
8146
8907
|
}, [loadBacklogData]);
|
|
@@ -8166,28 +8927,61 @@ function useKanbanData(options) {
|
|
|
8166
8927
|
if (!hasMore || isLoadingMore) {
|
|
8167
8928
|
return;
|
|
8168
8929
|
}
|
|
8930
|
+
const tracer = getTracer();
|
|
8931
|
+
const span = tracer.startSpan("kanban.load.more", {
|
|
8932
|
+
attributes: {
|
|
8933
|
+
"input.offset": totalLoaded,
|
|
8934
|
+
"input.limit": tasksLimit
|
|
8935
|
+
}
|
|
8936
|
+
});
|
|
8937
|
+
const startTime = Date.now();
|
|
8169
8938
|
setIsLoadingMore(true);
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8939
|
+
return withSpan(span, async () => {
|
|
8940
|
+
try {
|
|
8941
|
+
span.addEvent("kanban.load.more", {
|
|
8942
|
+
offset: totalLoaded,
|
|
8943
|
+
limit: tasksLimit
|
|
8944
|
+
});
|
|
8945
|
+
const result = await core2.loadMoreForSource("tasks", totalLoaded, {
|
|
8946
|
+
limit: tasksLimit,
|
|
8947
|
+
sortDirection: "asc"
|
|
8948
|
+
});
|
|
8949
|
+
console.log(
|
|
8950
|
+
`[useKanbanData] Loaded ${result.items.length} more tasks (${totalLoaded + result.items.length}/${result.total})`
|
|
8951
|
+
);
|
|
8952
|
+
const newTasks = [...tasks, ...result.items];
|
|
8953
|
+
setTasks(newTasks);
|
|
8954
|
+
setTotalLoaded(newTasks.length);
|
|
8955
|
+
setTotalCount(result.total);
|
|
8956
|
+
setHasMore(result.hasMore);
|
|
8957
|
+
const newColumnStates = buildColumnStates(newTasks);
|
|
8958
|
+
setColumnStates(newColumnStates);
|
|
8959
|
+
span.addEvent("kanban.loaded", {
|
|
8960
|
+
"tasks.count": newTasks.length,
|
|
8961
|
+
"tasks.newlyLoaded": result.items.length
|
|
8962
|
+
});
|
|
8963
|
+
span.setAttributes({
|
|
8964
|
+
"output.tasksLoaded": result.items.length,
|
|
8965
|
+
"output.totalTasks": newTasks.length,
|
|
8966
|
+
"output.hasMore": result.hasMore,
|
|
8967
|
+
"duration.ms": Date.now() - startTime
|
|
8968
|
+
});
|
|
8969
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
8970
|
+
} catch (err) {
|
|
8971
|
+
console.error("[useKanbanData] Failed to load more tasks:", err);
|
|
8972
|
+
const errorMessage = err instanceof Error ? err.message : "Failed to load more tasks";
|
|
8973
|
+
setError(errorMessage);
|
|
8974
|
+
span.addEvent("kanban.load.error", {
|
|
8975
|
+
"error.type": err instanceof Error ? err.name : "Unknown",
|
|
8976
|
+
"error.message": errorMessage
|
|
8977
|
+
});
|
|
8978
|
+
span.recordException(err);
|
|
8979
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: errorMessage });
|
|
8980
|
+
} finally {
|
|
8981
|
+
setIsLoadingMore(false);
|
|
8982
|
+
span.end();
|
|
8983
|
+
}
|
|
8984
|
+
});
|
|
8191
8985
|
}, [tasks, hasMore, isLoadingMore, totalLoaded, tasksLimit, buildColumnStates]);
|
|
8192
8986
|
const loadMore = useCallback(
|
|
8193
8987
|
async (_status) => {
|
|
@@ -8201,9 +8995,15 @@ function useKanbanData(options) {
|
|
|
8201
8995
|
const updateTaskStatus = useCallback(
|
|
8202
8996
|
async (taskId, newStatus) => {
|
|
8203
8997
|
const core2 = coreRef.current;
|
|
8998
|
+
const activeSpan = getActiveSpan();
|
|
8204
8999
|
if (!core2) {
|
|
8205
9000
|
console.warn("[useKanbanData] Core not available for updateTaskStatus");
|
|
8206
9001
|
setError("Cannot update task - backlog not loaded");
|
|
9002
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("task.save.error", {
|
|
9003
|
+
"error.type": "CoreNotAvailable",
|
|
9004
|
+
"error.message": "Cannot update task - backlog not loaded",
|
|
9005
|
+
"task.id": taskId
|
|
9006
|
+
});
|
|
8207
9007
|
return;
|
|
8208
9008
|
}
|
|
8209
9009
|
setError(null);
|
|
@@ -8214,10 +9014,21 @@ function useKanbanData(options) {
|
|
|
8214
9014
|
throw new Error(`Task ${taskId} not found`);
|
|
8215
9015
|
}
|
|
8216
9016
|
console.log(`[useKanbanData] Task ${taskId} updated successfully`);
|
|
9017
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("task.updated", {
|
|
9018
|
+
"task.id": taskId,
|
|
9019
|
+
"task.status": newStatus,
|
|
9020
|
+
"updated.fields": "status"
|
|
9021
|
+
});
|
|
8217
9022
|
await loadBacklogData();
|
|
8218
9023
|
} catch (err) {
|
|
8219
9024
|
console.error("[useKanbanData] Failed to update task status:", err);
|
|
8220
|
-
|
|
9025
|
+
const errorMessage = err instanceof Error ? err.message : "Failed to update task";
|
|
9026
|
+
setError(errorMessage);
|
|
9027
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("task.save.error", {
|
|
9028
|
+
"error.type": err instanceof Error ? err.name : "Unknown",
|
|
9029
|
+
"error.message": errorMessage,
|
|
9030
|
+
"task.id": taskId
|
|
9031
|
+
});
|
|
8221
9032
|
}
|
|
8222
9033
|
},
|
|
8223
9034
|
[loadBacklogData]
|
|
@@ -8225,13 +9036,21 @@ function useKanbanData(options) {
|
|
|
8225
9036
|
const moveTaskOptimistic = useCallback(
|
|
8226
9037
|
(taskId, toColumn) => {
|
|
8227
9038
|
const newStatus = toColumn;
|
|
9039
|
+
const activeSpan = getActiveSpan();
|
|
8228
9040
|
setTasks((prev) => {
|
|
9041
|
+
const task = prev.find((t) => t.id === taskId);
|
|
9042
|
+
const fromStatus = (task == null ? void 0 : task.status) || "unknown";
|
|
8229
9043
|
const newTasks = prev.map(
|
|
8230
9044
|
(t) => t.id === taskId ? { ...t, status: newStatus } : t
|
|
8231
9045
|
);
|
|
8232
9046
|
const newColumnStates = buildColumnStates(newTasks);
|
|
8233
9047
|
setColumnStates(newColumnStates);
|
|
8234
9048
|
console.log(`[useKanbanData] Moved task ${taskId} to ${toColumn} (${newStatus})`);
|
|
9049
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("task.moved", {
|
|
9050
|
+
"task.id": taskId,
|
|
9051
|
+
"from.status": fromStatus,
|
|
9052
|
+
"to.status": newStatus
|
|
9053
|
+
});
|
|
8235
9054
|
return newTasks;
|
|
8236
9055
|
});
|
|
8237
9056
|
},
|
|
@@ -8394,7 +9213,8 @@ const TaskCard = ({
|
|
|
8394
9213
|
borderRadius: theme2.radii[2],
|
|
8395
9214
|
padding: "12px",
|
|
8396
9215
|
border: `1px solid ${theme2.colors.border}`,
|
|
8397
|
-
borderLeft: `4px solid
|
|
9216
|
+
borderLeft: `4px solid transparent`,
|
|
9217
|
+
borderRight: `4px solid ${getPriorityColor(task.priority)}`,
|
|
8398
9218
|
cursor: isDragOverlay ? "grabbing" : "grab",
|
|
8399
9219
|
transition: isDragging ? "none" : "all 0.2s ease",
|
|
8400
9220
|
minHeight: "44px",
|
|
@@ -8411,7 +9231,7 @@ const TaskCard = ({
|
|
|
8411
9231
|
zIndex: 1e3
|
|
8412
9232
|
}
|
|
8413
9233
|
};
|
|
8414
|
-
const handleClick = (
|
|
9234
|
+
const handleClick = (_e2) => {
|
|
8415
9235
|
if (!isDragging && onClick) {
|
|
8416
9236
|
onClick(task);
|
|
8417
9237
|
}
|
|
@@ -8446,20 +9266,12 @@ const TaskCard = ({
|
|
|
8446
9266
|
...attributes,
|
|
8447
9267
|
onMouseEnter: (e) => {
|
|
8448
9268
|
if (!isDragging && !isDragOverlay) {
|
|
8449
|
-
|
|
8450
|
-
if (desc) {
|
|
8451
|
-
desc.style.maxHeight = "20em";
|
|
8452
|
-
}
|
|
8453
|
-
e.currentTarget.style.borderLeft = `4px solid ${getPriorityColor(task.priority)}`;
|
|
9269
|
+
e.currentTarget.style.borderLeft = `4px solid ${theme2.colors.primary}`;
|
|
8454
9270
|
}
|
|
8455
9271
|
},
|
|
8456
9272
|
onMouseLeave: (e) => {
|
|
8457
9273
|
if (!isDragging && !isDragOverlay) {
|
|
8458
|
-
|
|
8459
|
-
if (desc) {
|
|
8460
|
-
desc.style.maxHeight = "2.8em";
|
|
8461
|
-
}
|
|
8462
|
-
e.currentTarget.style.borderLeft = `4px solid ${getPriorityColor(task.priority)}`;
|
|
9274
|
+
e.currentTarget.style.borderLeft = `4px solid transparent`;
|
|
8463
9275
|
}
|
|
8464
9276
|
},
|
|
8465
9277
|
children: [
|
|
@@ -8506,9 +9318,8 @@ const TaskCard = ({
|
|
|
8506
9318
|
color: theme2.colors.textSecondary,
|
|
8507
9319
|
overflow: "hidden",
|
|
8508
9320
|
lineHeight: "1.4",
|
|
8509
|
-
maxHeight: "2.8em"
|
|
9321
|
+
maxHeight: "2.8em"
|
|
8510
9322
|
// 2 lines (1.4 * 2)
|
|
8511
|
-
transition: "max-height 0.3s ease"
|
|
8512
9323
|
},
|
|
8513
9324
|
children: task.description
|
|
8514
9325
|
}
|
|
@@ -9061,6 +9872,20 @@ const BoardEmptyState = ({
|
|
|
9061
9872
|
canWrite
|
|
9062
9873
|
}) => {
|
|
9063
9874
|
const { theme: theme2 } = useTheme();
|
|
9875
|
+
const handleAddTask = useCallback(() => {
|
|
9876
|
+
const activeSpan = getActiveSpan();
|
|
9877
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("empty.action.clicked", {
|
|
9878
|
+
"action.type": "add_task"
|
|
9879
|
+
});
|
|
9880
|
+
onAddTask();
|
|
9881
|
+
}, [onAddTask]);
|
|
9882
|
+
const handleAddMilestone = useCallback(() => {
|
|
9883
|
+
const activeSpan = getActiveSpan();
|
|
9884
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("empty.action.clicked", {
|
|
9885
|
+
"action.type": "add_milestone"
|
|
9886
|
+
});
|
|
9887
|
+
onAddMilestone();
|
|
9888
|
+
}, [onAddMilestone]);
|
|
9064
9889
|
return /* @__PURE__ */ jsxs(
|
|
9065
9890
|
"div",
|
|
9066
9891
|
{
|
|
@@ -9120,7 +9945,7 @@ const BoardEmptyState = ({
|
|
|
9120
9945
|
/* @__PURE__ */ jsxs(
|
|
9121
9946
|
"button",
|
|
9122
9947
|
{
|
|
9123
|
-
onClick:
|
|
9948
|
+
onClick: handleAddTask,
|
|
9124
9949
|
style: {
|
|
9125
9950
|
display: "inline-flex",
|
|
9126
9951
|
alignItems: "center",
|
|
@@ -9150,7 +9975,7 @@ const BoardEmptyState = ({
|
|
|
9150
9975
|
/* @__PURE__ */ jsxs(
|
|
9151
9976
|
"button",
|
|
9152
9977
|
{
|
|
9153
|
-
onClick:
|
|
9978
|
+
onClick: handleAddMilestone,
|
|
9154
9979
|
style: {
|
|
9155
9980
|
display: "inline-flex",
|
|
9156
9981
|
alignItems: "center",
|
|
@@ -9709,7 +10534,7 @@ const TaskModal = ({
|
|
|
9709
10534
|
return createPortal(modalContent, document.body);
|
|
9710
10535
|
};
|
|
9711
10536
|
function useMilestoneData(options) {
|
|
9712
|
-
const { context, actions } = options || {};
|
|
10537
|
+
const { context: context2, actions } = options || {};
|
|
9713
10538
|
const [milestones, setMilestones] = useState([]);
|
|
9714
10539
|
const [isLoading, setIsLoading] = useState(true);
|
|
9715
10540
|
const [error, setError] = useState(null);
|
|
@@ -9717,12 +10542,12 @@ function useMilestoneData(options) {
|
|
|
9717
10542
|
const [canWrite, setCanWrite] = useState(false);
|
|
9718
10543
|
const coreRef = useRef(null);
|
|
9719
10544
|
const activeFilePathRef = useRef(null);
|
|
9720
|
-
const contextRef = useRef(
|
|
10545
|
+
const contextRef = useRef(context2);
|
|
9721
10546
|
const actionsRef = useRef(actions);
|
|
9722
10547
|
useEffect(() => {
|
|
9723
|
-
contextRef.current =
|
|
10548
|
+
contextRef.current = context2;
|
|
9724
10549
|
actionsRef.current = actions;
|
|
9725
|
-
}, [
|
|
10550
|
+
}, [context2, actions]);
|
|
9726
10551
|
const fetchFileContent = useCallback(async (path2) => {
|
|
9727
10552
|
var _a;
|
|
9728
10553
|
const currentContext = contextRef.current;
|
|
@@ -9746,7 +10571,7 @@ function useMilestoneData(options) {
|
|
|
9746
10571
|
const fileTreeVersionRef = useRef(null);
|
|
9747
10572
|
const loadMilestoneData = useCallback(async () => {
|
|
9748
10573
|
var _a, _b, _c;
|
|
9749
|
-
if (!
|
|
10574
|
+
if (!context2 || !actions) {
|
|
9750
10575
|
console.log("[useMilestoneData] No context provided");
|
|
9751
10576
|
setIsBacklogProject(false);
|
|
9752
10577
|
setMilestones([]);
|
|
@@ -9755,7 +10580,7 @@ function useMilestoneData(options) {
|
|
|
9755
10580
|
fileTreeVersionRef.current = null;
|
|
9756
10581
|
return;
|
|
9757
10582
|
}
|
|
9758
|
-
const fileTreeSlice =
|
|
10583
|
+
const fileTreeSlice = context2.fileTree;
|
|
9759
10584
|
if (!((_a = fileTreeSlice == null ? void 0 : fileTreeSlice.data) == null ? void 0 : _a.allFiles)) {
|
|
9760
10585
|
console.log("[useMilestoneData] FileTree not available");
|
|
9761
10586
|
setIsBacklogProject(false);
|
|
@@ -9783,7 +10608,7 @@ function useMilestoneData(options) {
|
|
|
9783
10608
|
const fs = new PanelFileSystemAdapter({
|
|
9784
10609
|
fetchFile: fetchFileContent,
|
|
9785
10610
|
filePaths,
|
|
9786
|
-
hostFileSystem: (_c =
|
|
10611
|
+
hostFileSystem: (_c = context2.adapters) == null ? void 0 : _c.fileSystem
|
|
9787
10612
|
});
|
|
9788
10613
|
const core2 = new Core({
|
|
9789
10614
|
projectRoot: "",
|
|
@@ -9856,7 +10681,7 @@ function useMilestoneData(options) {
|
|
|
9856
10681
|
} finally {
|
|
9857
10682
|
setIsLoading(false);
|
|
9858
10683
|
}
|
|
9859
|
-
}, [
|
|
10684
|
+
}, [context2, actions, fetchFileContent]);
|
|
9860
10685
|
useEffect(() => {
|
|
9861
10686
|
loadMilestoneData();
|
|
9862
10687
|
}, [loadMilestoneData]);
|
|
@@ -10240,7 +11065,7 @@ const MilestoneModal = ({
|
|
|
10240
11065
|
return createPortal(modalContent, document.body);
|
|
10241
11066
|
};
|
|
10242
11067
|
const KanbanPanel = ({
|
|
10243
|
-
context,
|
|
11068
|
+
context: context2,
|
|
10244
11069
|
actions,
|
|
10245
11070
|
events: events2
|
|
10246
11071
|
}) => {
|
|
@@ -10260,6 +11085,28 @@ const KanbanPanel = ({
|
|
|
10260
11085
|
const [selectedMilestoneId, setSelectedMilestoneId] = useState(null);
|
|
10261
11086
|
const [milestoneStatusFilter, setMilestoneStatusFilter] = useState(null);
|
|
10262
11087
|
const [searchQuery, setSearchQuery] = useState("");
|
|
11088
|
+
const [isSearchVisible, setIsSearchVisible] = useState(false);
|
|
11089
|
+
const searchDebounceRef = useRef(null);
|
|
11090
|
+
const handleSearchChange = useCallback((value) => {
|
|
11091
|
+
setSearchQuery(value);
|
|
11092
|
+
if (searchDebounceRef.current) {
|
|
11093
|
+
clearTimeout(searchDebounceRef.current);
|
|
11094
|
+
}
|
|
11095
|
+
searchDebounceRef.current = setTimeout(() => {
|
|
11096
|
+
const activeSpan = getActiveSpan();
|
|
11097
|
+
if (value.trim()) {
|
|
11098
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("search.performed", {
|
|
11099
|
+
"search.query": value.trim()
|
|
11100
|
+
// Note: results.count is approximate since filteredTasksByStatus updates async
|
|
11101
|
+
});
|
|
11102
|
+
}
|
|
11103
|
+
}, 500);
|
|
11104
|
+
}, []);
|
|
11105
|
+
const handleClearSearch = useCallback(() => {
|
|
11106
|
+
setSearchQuery("");
|
|
11107
|
+
const activeSpan = getActiveSpan();
|
|
11108
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("filter.cleared");
|
|
11109
|
+
}, []);
|
|
10263
11110
|
const sensors = useSensors(
|
|
10264
11111
|
useSensor(PointerSensor, {
|
|
10265
11112
|
activationConstraint: {
|
|
@@ -10316,7 +11163,7 @@ const KanbanPanel = ({
|
|
|
10316
11163
|
canWrite,
|
|
10317
11164
|
core: core2
|
|
10318
11165
|
} = useKanbanData({
|
|
10319
|
-
context,
|
|
11166
|
+
context: context2,
|
|
10320
11167
|
actions,
|
|
10321
11168
|
events: events2,
|
|
10322
11169
|
tasksLimit: 20
|
|
@@ -10329,7 +11176,7 @@ const KanbanPanel = ({
|
|
|
10329
11176
|
canWrite: canWriteMilestones,
|
|
10330
11177
|
core: milestoneCore
|
|
10331
11178
|
} = useMilestoneData({
|
|
10332
|
-
context,
|
|
11179
|
+
context: context2,
|
|
10333
11180
|
actions
|
|
10334
11181
|
});
|
|
10335
11182
|
const filteredTasksByStatus = useMemo(() => {
|
|
@@ -10352,28 +11199,84 @@ const KanbanPanel = ({
|
|
|
10352
11199
|
}
|
|
10353
11200
|
return filtered;
|
|
10354
11201
|
}, [tasksByStatus, searchQuery]);
|
|
11202
|
+
const dragSpanRef = useRef(null);
|
|
10355
11203
|
const handleDragStart = useCallback((event) => {
|
|
10356
11204
|
const { active } = event;
|
|
10357
11205
|
const task = getTaskById(active.id);
|
|
10358
11206
|
if (task) {
|
|
10359
11207
|
setActiveTask(task);
|
|
11208
|
+
const tracer = getTracer();
|
|
11209
|
+
const span = tracer.startSpan("task.edit", {
|
|
11210
|
+
attributes: {
|
|
11211
|
+
"input.taskId": task.id,
|
|
11212
|
+
"input.fromStatus": task.status || "unknown"
|
|
11213
|
+
}
|
|
11214
|
+
});
|
|
11215
|
+
dragSpanRef.current = span;
|
|
11216
|
+
span.addEvent("task.drag.started", {
|
|
11217
|
+
"task.id": task.id,
|
|
11218
|
+
"from.status": task.status || "unknown"
|
|
11219
|
+
});
|
|
10360
11220
|
}
|
|
10361
11221
|
}, [getTaskById]);
|
|
10362
11222
|
const handleDragEnd = useCallback((event) => {
|
|
10363
11223
|
const { active, over } = event;
|
|
11224
|
+
const span = dragSpanRef.current;
|
|
10364
11225
|
setActiveTask(null);
|
|
10365
|
-
if (!over)
|
|
11226
|
+
if (!over) {
|
|
11227
|
+
if (span) {
|
|
11228
|
+
span.addEvent("task.drag.cancelled");
|
|
11229
|
+
span.setAttributes({ "output.cancelled": true });
|
|
11230
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
11231
|
+
span.end();
|
|
11232
|
+
dragSpanRef.current = null;
|
|
11233
|
+
}
|
|
11234
|
+
return;
|
|
11235
|
+
}
|
|
10366
11236
|
const taskId = active.id;
|
|
10367
11237
|
const targetColumn = over.id;
|
|
10368
11238
|
const task = getTaskById(taskId);
|
|
10369
|
-
if (!task)
|
|
11239
|
+
if (!task) {
|
|
11240
|
+
if (span) {
|
|
11241
|
+
span.setStatus({ code: SpanStatusCode.ERROR, message: "Task not found" });
|
|
11242
|
+
span.end();
|
|
11243
|
+
dragSpanRef.current = null;
|
|
11244
|
+
}
|
|
11245
|
+
return;
|
|
11246
|
+
}
|
|
10370
11247
|
const currentColumn = task.status || DEFAULT_TASK_STATUSES.TODO;
|
|
10371
11248
|
if (currentColumn !== targetColumn) {
|
|
10372
|
-
|
|
11249
|
+
if (span) {
|
|
11250
|
+
withSpan(span, async () => {
|
|
11251
|
+
moveTaskOptimistic(taskId, targetColumn);
|
|
11252
|
+
});
|
|
11253
|
+
span.setAttributes({
|
|
11254
|
+
"output.toStatus": targetColumn,
|
|
11255
|
+
"output.moved": true
|
|
11256
|
+
});
|
|
11257
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
11258
|
+
span.end();
|
|
11259
|
+
dragSpanRef.current = null;
|
|
11260
|
+
} else {
|
|
11261
|
+
moveTaskOptimistic(taskId, targetColumn);
|
|
11262
|
+
}
|
|
11263
|
+
} else {
|
|
11264
|
+
if (span) {
|
|
11265
|
+
span.addEvent("task.drag.cancelled");
|
|
11266
|
+
span.setAttributes({ "output.cancelled": true, "output.reason": "same_column" });
|
|
11267
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
11268
|
+
span.end();
|
|
11269
|
+
dragSpanRef.current = null;
|
|
11270
|
+
}
|
|
10373
11271
|
}
|
|
10374
11272
|
}, [getTaskById, moveTaskOptimistic]);
|
|
10375
11273
|
const handleTaskClick = (task) => {
|
|
10376
11274
|
setSelectedTaskId(task.id);
|
|
11275
|
+
const activeSpan = getActiveSpan();
|
|
11276
|
+
activeSpan == null ? void 0 : activeSpan.addEvent("task.selected", {
|
|
11277
|
+
"task.id": task.id,
|
|
11278
|
+
"task.status": task.status || "unknown"
|
|
11279
|
+
});
|
|
10377
11280
|
if (events2) {
|
|
10378
11281
|
events2.emit({
|
|
10379
11282
|
type: "task:selected",
|
|
@@ -10383,16 +11286,16 @@ const KanbanPanel = ({
|
|
|
10383
11286
|
});
|
|
10384
11287
|
}
|
|
10385
11288
|
};
|
|
10386
|
-
const fileSystem = (_a =
|
|
11289
|
+
const fileSystem = (_a = context2.adapters) == null ? void 0 : _a.fileSystem;
|
|
10387
11290
|
const canInitialize = Boolean(
|
|
10388
|
-
(fileSystem == null ? void 0 : fileSystem.writeFile) && (fileSystem == null ? void 0 : fileSystem.createDir) && ((_b =
|
|
11291
|
+
(fileSystem == null ? void 0 : fileSystem.writeFile) && (fileSystem == null ? void 0 : fileSystem.createDir) && ((_b = context2.currentScope.repository) == null ? void 0 : _b.path)
|
|
10389
11292
|
);
|
|
10390
11293
|
const handleInitialize = useCallback(async () => {
|
|
10391
11294
|
var _a2, _b2;
|
|
10392
11295
|
if (!(fileSystem == null ? void 0 : fileSystem.writeFile) || !(fileSystem == null ? void 0 : fileSystem.createDir)) {
|
|
10393
11296
|
throw new Error("File system adapter not available");
|
|
10394
11297
|
}
|
|
10395
|
-
const repoPath = (_a2 =
|
|
11298
|
+
const repoPath = (_a2 = context2.currentScope.repository) == null ? void 0 : _a2.path;
|
|
10396
11299
|
if (!repoPath) {
|
|
10397
11300
|
throw new Error("Repository path not available");
|
|
10398
11301
|
}
|
|
@@ -10439,32 +11342,80 @@ const KanbanPanel = ({
|
|
|
10439
11342
|
projectRoot: repoPath,
|
|
10440
11343
|
adapters: { fs: fsAdapter }
|
|
10441
11344
|
});
|
|
10442
|
-
const projectName = ((_b2 =
|
|
11345
|
+
const projectName = ((_b2 = context2.currentScope.repository) == null ? void 0 : _b2.name) || "Backlog";
|
|
10443
11346
|
await core22.initProject({ projectName });
|
|
10444
11347
|
await refreshData();
|
|
10445
|
-
}, [fileSystem,
|
|
11348
|
+
}, [fileSystem, context2.currentScope.repository, refreshData]);
|
|
11349
|
+
const taskSaveCompletedRef = useRef(false);
|
|
11350
|
+
const taskModalSpanRef = useRef(null);
|
|
10446
11351
|
const handleOpenNewTask = useCallback(() => {
|
|
10447
11352
|
setEditingTask(void 0);
|
|
10448
11353
|
setIsTaskModalOpen(true);
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
11354
|
+
taskSaveCompletedRef.current = false;
|
|
11355
|
+
const tracer = getTracer();
|
|
11356
|
+
const span = tracer.startSpan("task.create");
|
|
11357
|
+
taskModalSpanRef.current = span;
|
|
11358
|
+
span.addEvent("modal.opened", {
|
|
11359
|
+
"modal.type": "task",
|
|
11360
|
+
"modal.mode": "create"
|
|
11361
|
+
});
|
|
10453
11362
|
}, []);
|
|
10454
11363
|
const handleCloseTaskModal = useCallback(() => {
|
|
11364
|
+
const span = taskModalSpanRef.current;
|
|
11365
|
+
if (!taskSaveCompletedRef.current && span) {
|
|
11366
|
+
span.addEvent("modal.cancelled", {
|
|
11367
|
+
"had.changes": false
|
|
11368
|
+
// We don't track dirty state yet
|
|
11369
|
+
});
|
|
11370
|
+
span.setAttributes({ "output.cancelled": true });
|
|
11371
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
11372
|
+
span.end();
|
|
11373
|
+
}
|
|
10455
11374
|
setIsTaskModalOpen(false);
|
|
10456
11375
|
setEditingTask(void 0);
|
|
11376
|
+
taskModalSpanRef.current = null;
|
|
10457
11377
|
}, []);
|
|
10458
11378
|
const handleSaveTask = useCallback(async (input) => {
|
|
10459
11379
|
if (!core2) {
|
|
10460
11380
|
throw new Error("Backlog not loaded");
|
|
10461
11381
|
}
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
11382
|
+
const span = taskModalSpanRef.current;
|
|
11383
|
+
const isEditing = !!editingTask;
|
|
11384
|
+
try {
|
|
11385
|
+
if (isEditing) {
|
|
11386
|
+
await core2.updateTask(editingTask.id, input);
|
|
11387
|
+
span == null ? void 0 : span.addEvent("task.updated", {
|
|
11388
|
+
"task.id": editingTask.id,
|
|
11389
|
+
"updated.fields": Object.keys(input).join(", ")
|
|
11390
|
+
});
|
|
11391
|
+
} else {
|
|
11392
|
+
const newTask = await core2.createTask(input);
|
|
11393
|
+
span == null ? void 0 : span.addEvent("task.created", {
|
|
11394
|
+
"task.id": (newTask == null ? void 0 : newTask.id) || "unknown",
|
|
11395
|
+
"task.status": input.status || "To Do"
|
|
11396
|
+
});
|
|
11397
|
+
}
|
|
11398
|
+
taskSaveCompletedRef.current = true;
|
|
11399
|
+
if (span) {
|
|
11400
|
+
span.setAttributes({
|
|
11401
|
+
"output.success": true,
|
|
11402
|
+
"output.operation": isEditing ? "update" : "create"
|
|
11403
|
+
});
|
|
11404
|
+
span.setStatus({ code: SpanStatusCode.OK });
|
|
11405
|
+
span.end();
|
|
11406
|
+
taskModalSpanRef.current = null;
|
|
11407
|
+
}
|
|
11408
|
+
await refreshData();
|
|
11409
|
+
} catch (err) {
|
|
11410
|
+
const errorMessage = err instanceof Error ? err.message : "Failed to save task";
|
|
11411
|
+
span == null ? void 0 : span.addEvent("task.save.error", {
|
|
11412
|
+
"error.type": err instanceof Error ? err.name : "Unknown",
|
|
11413
|
+
"error.message": errorMessage
|
|
11414
|
+
});
|
|
11415
|
+
span == null ? void 0 : span.recordException(err);
|
|
11416
|
+
span == null ? void 0 : span.setStatus({ code: SpanStatusCode.ERROR, message: errorMessage });
|
|
11417
|
+
throw err;
|
|
10466
11418
|
}
|
|
10467
|
-
await refreshData();
|
|
10468
11419
|
}, [core2, editingTask, refreshData]);
|
|
10469
11420
|
const handleOpenNewMilestone = useCallback(() => {
|
|
10470
11421
|
setEditingMilestone(void 0);
|
|
@@ -10629,77 +11580,33 @@ const KanbanPanel = ({
|
|
|
10629
11580
|
}
|
|
10630
11581
|
)
|
|
10631
11582
|
] }),
|
|
10632
|
-
isBacklogProject &&
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
children: [
|
|
10642
|
-
/* @__PURE__ */ jsx(
|
|
10643
|
-
Search,
|
|
10644
|
-
{
|
|
10645
|
-
size: 16,
|
|
10646
|
-
color: theme2.colors.textSecondary,
|
|
10647
|
-
style: {
|
|
10648
|
-
position: "absolute",
|
|
10649
|
-
left: "10px",
|
|
10650
|
-
top: "50%",
|
|
10651
|
-
transform: "translateY(-50%)",
|
|
10652
|
-
pointerEvents: "none"
|
|
10653
|
-
}
|
|
10654
|
-
}
|
|
10655
|
-
),
|
|
10656
|
-
/* @__PURE__ */ jsx(
|
|
10657
|
-
"input",
|
|
10658
|
-
{
|
|
10659
|
-
type: "text",
|
|
10660
|
-
placeholder: "Search tasks...",
|
|
10661
|
-
value: searchQuery,
|
|
10662
|
-
onChange: (e) => setSearchQuery(e.target.value),
|
|
10663
|
-
style: {
|
|
10664
|
-
width: "100%",
|
|
10665
|
-
padding: "8px 32px 8px 32px",
|
|
10666
|
-
fontSize: theme2.fontSizes[1],
|
|
10667
|
-
fontFamily: theme2.fonts.body,
|
|
10668
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
10669
|
-
borderRadius: theme2.radii[2],
|
|
10670
|
-
background: theme2.colors.backgroundSecondary,
|
|
10671
|
-
color: theme2.colors.text,
|
|
10672
|
-
outline: "none",
|
|
10673
|
-
boxSizing: "border-box"
|
|
10674
|
-
}
|
|
10675
|
-
}
|
|
10676
|
-
),
|
|
10677
|
-
searchQuery && /* @__PURE__ */ jsx(
|
|
10678
|
-
"button",
|
|
10679
|
-
{
|
|
10680
|
-
onClick: () => setSearchQuery(""),
|
|
10681
|
-
style: {
|
|
10682
|
-
position: "absolute",
|
|
10683
|
-
right: "6px",
|
|
10684
|
-
top: "50%",
|
|
10685
|
-
transform: "translateY(-50%)",
|
|
10686
|
-
background: "transparent",
|
|
10687
|
-
border: "none",
|
|
10688
|
-
padding: "4px",
|
|
10689
|
-
cursor: "pointer",
|
|
10690
|
-
display: "flex",
|
|
10691
|
-
alignItems: "center",
|
|
10692
|
-
justifyContent: "center",
|
|
10693
|
-
color: theme2.colors.textSecondary
|
|
10694
|
-
},
|
|
10695
|
-
"aria-label": "Clear search",
|
|
10696
|
-
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
11583
|
+
isBacklogProject && totalTasksState.total > 0 && /* @__PURE__ */ jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px", flexWrap: "wrap" }, children: viewMode === "board" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11584
|
+
/* @__PURE__ */ jsx(
|
|
11585
|
+
"button",
|
|
11586
|
+
{
|
|
11587
|
+
onClick: () => {
|
|
11588
|
+
const newVisible = !isSearchVisible;
|
|
11589
|
+
setIsSearchVisible(newVisible);
|
|
11590
|
+
if (!newVisible) {
|
|
11591
|
+
setSearchQuery("");
|
|
10697
11592
|
}
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
11593
|
+
},
|
|
11594
|
+
style: {
|
|
11595
|
+
display: "flex",
|
|
11596
|
+
alignItems: "center",
|
|
11597
|
+
justifyContent: "center",
|
|
11598
|
+
background: isSearchVisible ? theme2.colors.primary : theme2.colors.backgroundSecondary,
|
|
11599
|
+
color: isSearchVisible ? theme2.colors.textOnPrimary : theme2.colors.textSecondary,
|
|
11600
|
+
border: isSearchVisible ? "none" : `1px solid ${theme2.colors.border}`,
|
|
11601
|
+
borderRadius: theme2.radii[2],
|
|
11602
|
+
padding: "6px",
|
|
11603
|
+
cursor: "pointer",
|
|
11604
|
+
transition: "all 0.2s ease"
|
|
11605
|
+
},
|
|
11606
|
+
title: isSearchVisible ? "Hide search" : "Search tasks",
|
|
11607
|
+
children: /* @__PURE__ */ jsx(Search, { size: 16 })
|
|
11608
|
+
}
|
|
11609
|
+
),
|
|
10703
11610
|
canWrite && /* @__PURE__ */ jsxs(
|
|
10704
11611
|
"button",
|
|
10705
11612
|
{
|
|
@@ -10723,26 +11630,6 @@ const KanbanPanel = ({
|
|
|
10723
11630
|
"Add Task"
|
|
10724
11631
|
]
|
|
10725
11632
|
}
|
|
10726
|
-
),
|
|
10727
|
-
totalTasksState.hasMore && /* @__PURE__ */ jsx(
|
|
10728
|
-
"button",
|
|
10729
|
-
{
|
|
10730
|
-
onClick: loadMoreTasks,
|
|
10731
|
-
disabled: totalTasksState.isLoadingMore,
|
|
10732
|
-
style: {
|
|
10733
|
-
background: theme2.colors.backgroundSecondary,
|
|
10734
|
-
color: theme2.colors.text,
|
|
10735
|
-
border: `1px solid ${theme2.colors.border}`,
|
|
10736
|
-
borderRadius: theme2.radii[2],
|
|
10737
|
-
padding: "6px 12px",
|
|
10738
|
-
fontSize: theme2.fontSizes[1],
|
|
10739
|
-
fontWeight: theme2.fontWeights.medium,
|
|
10740
|
-
cursor: totalTasksState.isLoadingMore ? "wait" : "pointer",
|
|
10741
|
-
opacity: totalTasksState.isLoadingMore ? 0.7 : 1,
|
|
10742
|
-
transition: "opacity 0.2s ease"
|
|
10743
|
-
},
|
|
10744
|
-
children: totalTasksState.isLoadingMore ? "Loading..." : `Load more (${totalTasksState.total - totalTasksState.loaded} remaining)`
|
|
10745
|
-
}
|
|
10746
11633
|
)
|
|
10747
11634
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10748
11635
|
canWrite && /* @__PURE__ */ jsxs(
|
|
@@ -10829,6 +11716,108 @@ const KanbanPanel = ({
|
|
|
10829
11716
|
]
|
|
10830
11717
|
}
|
|
10831
11718
|
),
|
|
11719
|
+
isBacklogProject && viewMode === "board" && totalTasksState.total > 0 && isSearchVisible && /* @__PURE__ */ jsxs(
|
|
11720
|
+
"div",
|
|
11721
|
+
{
|
|
11722
|
+
style: {
|
|
11723
|
+
flexShrink: 0,
|
|
11724
|
+
display: "flex",
|
|
11725
|
+
alignItems: "center",
|
|
11726
|
+
gap: "12px"
|
|
11727
|
+
},
|
|
11728
|
+
children: [
|
|
11729
|
+
/* @__PURE__ */ jsxs(
|
|
11730
|
+
"div",
|
|
11731
|
+
{
|
|
11732
|
+
style: {
|
|
11733
|
+
position: "relative",
|
|
11734
|
+
flex: 1
|
|
11735
|
+
},
|
|
11736
|
+
children: [
|
|
11737
|
+
/* @__PURE__ */ jsx(
|
|
11738
|
+
Search,
|
|
11739
|
+
{
|
|
11740
|
+
size: 16,
|
|
11741
|
+
color: theme2.colors.textSecondary,
|
|
11742
|
+
style: {
|
|
11743
|
+
position: "absolute",
|
|
11744
|
+
left: "10px",
|
|
11745
|
+
top: "50%",
|
|
11746
|
+
transform: "translateY(-50%)",
|
|
11747
|
+
pointerEvents: "none"
|
|
11748
|
+
}
|
|
11749
|
+
}
|
|
11750
|
+
),
|
|
11751
|
+
/* @__PURE__ */ jsx(
|
|
11752
|
+
"input",
|
|
11753
|
+
{
|
|
11754
|
+
type: "text",
|
|
11755
|
+
placeholder: "Search tasks...",
|
|
11756
|
+
value: searchQuery,
|
|
11757
|
+
onChange: (e) => handleSearchChange(e.target.value),
|
|
11758
|
+
style: {
|
|
11759
|
+
width: "100%",
|
|
11760
|
+
padding: "8px 32px 8px 32px",
|
|
11761
|
+
fontSize: theme2.fontSizes[1],
|
|
11762
|
+
fontFamily: theme2.fonts.body,
|
|
11763
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
11764
|
+
borderRadius: theme2.radii[2],
|
|
11765
|
+
background: theme2.colors.backgroundSecondary,
|
|
11766
|
+
color: theme2.colors.text,
|
|
11767
|
+
outline: "none",
|
|
11768
|
+
boxSizing: "border-box"
|
|
11769
|
+
}
|
|
11770
|
+
}
|
|
11771
|
+
),
|
|
11772
|
+
searchQuery && /* @__PURE__ */ jsx(
|
|
11773
|
+
"button",
|
|
11774
|
+
{
|
|
11775
|
+
onClick: handleClearSearch,
|
|
11776
|
+
style: {
|
|
11777
|
+
position: "absolute",
|
|
11778
|
+
right: "6px",
|
|
11779
|
+
top: "50%",
|
|
11780
|
+
transform: "translateY(-50%)",
|
|
11781
|
+
background: "transparent",
|
|
11782
|
+
border: "none",
|
|
11783
|
+
padding: "4px",
|
|
11784
|
+
cursor: "pointer",
|
|
11785
|
+
display: "flex",
|
|
11786
|
+
alignItems: "center",
|
|
11787
|
+
justifyContent: "center",
|
|
11788
|
+
color: theme2.colors.textSecondary
|
|
11789
|
+
},
|
|
11790
|
+
"aria-label": "Clear search",
|
|
11791
|
+
children: /* @__PURE__ */ jsx(X, { size: 14 })
|
|
11792
|
+
}
|
|
11793
|
+
)
|
|
11794
|
+
]
|
|
11795
|
+
}
|
|
11796
|
+
),
|
|
11797
|
+
totalTasksState.hasMore && /* @__PURE__ */ jsx(
|
|
11798
|
+
"button",
|
|
11799
|
+
{
|
|
11800
|
+
onClick: loadMoreTasks,
|
|
11801
|
+
disabled: totalTasksState.isLoadingMore,
|
|
11802
|
+
style: {
|
|
11803
|
+
flexShrink: 0,
|
|
11804
|
+
background: theme2.colors.backgroundSecondary,
|
|
11805
|
+
color: theme2.colors.text,
|
|
11806
|
+
border: `1px solid ${theme2.colors.border}`,
|
|
11807
|
+
borderRadius: theme2.radii[2],
|
|
11808
|
+
padding: "8px 12px",
|
|
11809
|
+
fontSize: theme2.fontSizes[1],
|
|
11810
|
+
fontWeight: theme2.fontWeights.medium,
|
|
11811
|
+
cursor: totalTasksState.isLoadingMore ? "wait" : "pointer",
|
|
11812
|
+
opacity: totalTasksState.isLoadingMore ? 0.7 : 1,
|
|
11813
|
+
transition: "opacity 0.2s ease"
|
|
11814
|
+
},
|
|
11815
|
+
children: totalTasksState.isLoadingMore ? "Loading..." : `Load more (${totalTasksState.total - totalTasksState.loaded} remaining)`
|
|
11816
|
+
}
|
|
11817
|
+
)
|
|
11818
|
+
]
|
|
11819
|
+
}
|
|
11820
|
+
),
|
|
10832
11821
|
currentError && /* @__PURE__ */ jsxs(
|
|
10833
11822
|
"div",
|
|
10834
11823
|
{
|
|
@@ -14630,13 +15619,13 @@ function classifyCharacter(code2) {
|
|
|
14630
15619
|
return 2;
|
|
14631
15620
|
}
|
|
14632
15621
|
}
|
|
14633
|
-
function resolveAll(constructs2, events2,
|
|
15622
|
+
function resolveAll(constructs2, events2, context2) {
|
|
14634
15623
|
const called = [];
|
|
14635
15624
|
let index2 = -1;
|
|
14636
15625
|
while (++index2 < constructs2.length) {
|
|
14637
15626
|
const resolve = constructs2[index2].resolveAll;
|
|
14638
15627
|
if (resolve && !called.includes(resolve)) {
|
|
14639
|
-
events2 = resolve(events2,
|
|
15628
|
+
events2 = resolve(events2, context2);
|
|
14640
15629
|
called.push(resolve);
|
|
14641
15630
|
}
|
|
14642
15631
|
}
|
|
@@ -14647,7 +15636,7 @@ const attention = {
|
|
|
14647
15636
|
resolveAll: resolveAllAttention,
|
|
14648
15637
|
tokenize: tokenizeAttention
|
|
14649
15638
|
};
|
|
14650
|
-
function resolveAllAttention(events2,
|
|
15639
|
+
function resolveAllAttention(events2, context2) {
|
|
14651
15640
|
let index2 = -1;
|
|
14652
15641
|
let open;
|
|
14653
15642
|
let group;
|
|
@@ -14662,7 +15651,7 @@ function resolveAllAttention(events2, context) {
|
|
|
14662
15651
|
open = index2;
|
|
14663
15652
|
while (open--) {
|
|
14664
15653
|
if (events2[open][0] === "exit" && events2[open][1].type === "attentionSequence" && events2[open][1]._open && // If the markers are the same:
|
|
14665
|
-
|
|
15654
|
+
context2.sliceSerialize(events2[open][1]).charCodeAt(0) === context2.sliceSerialize(events2[index2][1]).charCodeAt(0)) {
|
|
14666
15655
|
if ((events2[open][1]._close || events2[index2][1]._open) && (events2[index2][1].end.offset - events2[index2][1].start.offset) % 3 && !((events2[open][1].end.offset - events2[open][1].start.offset + events2[index2][1].end.offset - events2[index2][1].start.offset) % 3)) {
|
|
14667
15656
|
continue;
|
|
14668
15657
|
}
|
|
@@ -14715,14 +15704,14 @@ function resolveAllAttention(events2, context) {
|
|
|
14715
15704
|
};
|
|
14716
15705
|
nextEvents = [];
|
|
14717
15706
|
if (events2[open][1].end.offset - events2[open][1].start.offset) {
|
|
14718
|
-
nextEvents = push(nextEvents, [["enter", events2[open][1],
|
|
15707
|
+
nextEvents = push(nextEvents, [["enter", events2[open][1], context2], ["exit", events2[open][1], context2]]);
|
|
14719
15708
|
}
|
|
14720
|
-
nextEvents = push(nextEvents, [["enter", group,
|
|
14721
|
-
nextEvents = push(nextEvents, resolveAll(
|
|
14722
|
-
nextEvents = push(nextEvents, [["exit", text2,
|
|
15709
|
+
nextEvents = push(nextEvents, [["enter", group, context2], ["enter", openingSequence, context2], ["exit", openingSequence, context2], ["enter", text2, context2]]);
|
|
15710
|
+
nextEvents = push(nextEvents, resolveAll(context2.parser.constructs.insideSpan.null, events2.slice(open + 1, index2), context2));
|
|
15711
|
+
nextEvents = push(nextEvents, [["exit", text2, context2], ["enter", closingSequence, context2], ["exit", closingSequence, context2], ["exit", group, context2]]);
|
|
14723
15712
|
if (events2[index2][1].end.offset - events2[index2][1].start.offset) {
|
|
14724
15713
|
offset = 2;
|
|
14725
|
-
nextEvents = push(nextEvents, [["enter", events2[index2][1],
|
|
15714
|
+
nextEvents = push(nextEvents, [["enter", events2[index2][1], context2], ["exit", events2[index2][1], context2]]);
|
|
14726
15715
|
} else {
|
|
14727
15716
|
offset = 0;
|
|
14728
15717
|
}
|
|
@@ -15645,12 +16634,12 @@ function subtokenize(eventsArray) {
|
|
|
15645
16634
|
}
|
|
15646
16635
|
function subcontent(events2, eventIndex) {
|
|
15647
16636
|
const token = events2.get(eventIndex)[1];
|
|
15648
|
-
const
|
|
16637
|
+
const context2 = events2.get(eventIndex)[2];
|
|
15649
16638
|
let startPosition = eventIndex - 1;
|
|
15650
16639
|
const startPositions = [];
|
|
15651
16640
|
let tokenizer = token._tokenizer;
|
|
15652
16641
|
if (!tokenizer) {
|
|
15653
|
-
tokenizer =
|
|
16642
|
+
tokenizer = context2.parser[token.contentType](token.start);
|
|
15654
16643
|
if (token._contentTypeTextTrailing) {
|
|
15655
16644
|
tokenizer._contentTypeTextTrailing = true;
|
|
15656
16645
|
}
|
|
@@ -15670,7 +16659,7 @@ function subcontent(events2, eventIndex) {
|
|
|
15670
16659
|
}
|
|
15671
16660
|
startPositions.push(startPosition);
|
|
15672
16661
|
if (!current._tokenizer) {
|
|
15673
|
-
stream =
|
|
16662
|
+
stream = context2.sliceStream(current);
|
|
15674
16663
|
if (!current.next) {
|
|
15675
16664
|
stream.push(null);
|
|
15676
16665
|
}
|
|
@@ -16126,7 +17115,7 @@ const headingAtx = {
|
|
|
16126
17115
|
resolve: resolveHeadingAtx,
|
|
16127
17116
|
tokenize: tokenizeHeadingAtx
|
|
16128
17117
|
};
|
|
16129
|
-
function resolveHeadingAtx(events2,
|
|
17118
|
+
function resolveHeadingAtx(events2, context2) {
|
|
16130
17119
|
let contentEnd = events2.length - 2;
|
|
16131
17120
|
let contentStart = 3;
|
|
16132
17121
|
let content2;
|
|
@@ -16152,7 +17141,7 @@ function resolveHeadingAtx(events2, context) {
|
|
|
16152
17141
|
end: events2[contentEnd][1].end,
|
|
16153
17142
|
contentType: "text"
|
|
16154
17143
|
};
|
|
16155
|
-
splice(events2, contentStart, contentEnd - contentStart + 1, [["enter", content2,
|
|
17144
|
+
splice(events2, contentStart, contentEnd - contentStart + 1, [["enter", content2, context2], ["enter", text2, context2], ["exit", text2, context2], ["exit", content2, context2]]);
|
|
16156
17145
|
}
|
|
16157
17146
|
return events2;
|
|
16158
17147
|
}
|
|
@@ -16988,7 +17977,7 @@ function resolveAllLabelEnd(events2) {
|
|
|
16988
17977
|
}
|
|
16989
17978
|
return events2;
|
|
16990
17979
|
}
|
|
16991
|
-
function resolveToLabelEnd(events2,
|
|
17980
|
+
function resolveToLabelEnd(events2, context2) {
|
|
16992
17981
|
let index2 = events2.length;
|
|
16993
17982
|
let offset = 0;
|
|
16994
17983
|
let token;
|
|
@@ -17043,13 +18032,13 @@ function resolveToLabelEnd(events2, context) {
|
|
|
17043
18032
|
...events2[close - 2][1].start
|
|
17044
18033
|
}
|
|
17045
18034
|
};
|
|
17046
|
-
media = [["enter", group,
|
|
18035
|
+
media = [["enter", group, context2], ["enter", label, context2]];
|
|
17047
18036
|
media = push(media, events2.slice(open + 1, open + offset + 3));
|
|
17048
|
-
media = push(media, [["enter", text2,
|
|
17049
|
-
media = push(media, resolveAll(
|
|
17050
|
-
media = push(media, [["exit", text2,
|
|
18037
|
+
media = push(media, [["enter", text2, context2]]);
|
|
18038
|
+
media = push(media, resolveAll(context2.parser.constructs.insideSpan.null, events2.slice(open + offset + 4, close - 3), context2));
|
|
18039
|
+
media = push(media, [["exit", text2, context2], events2[close - 2], events2[close - 1], ["exit", label, context2]]);
|
|
17051
18040
|
media = push(media, events2.slice(close + 1));
|
|
17052
|
-
media = push(media, [["exit", group,
|
|
18041
|
+
media = push(media, [["exit", group, context2]]);
|
|
17053
18042
|
splice(events2, open, events2.length, media);
|
|
17054
18043
|
return events2;
|
|
17055
18044
|
}
|
|
@@ -17412,7 +18401,7 @@ const setextUnderline = {
|
|
|
17412
18401
|
resolveTo: resolveToSetextUnderline,
|
|
17413
18402
|
tokenize: tokenizeSetextUnderline
|
|
17414
18403
|
};
|
|
17415
|
-
function resolveToSetextUnderline(events2,
|
|
18404
|
+
function resolveToSetextUnderline(events2, context2) {
|
|
17416
18405
|
let index2 = events2.length;
|
|
17417
18406
|
let content2;
|
|
17418
18407
|
let text2;
|
|
@@ -17446,15 +18435,15 @@ function resolveToSetextUnderline(events2, context) {
|
|
|
17446
18435
|
};
|
|
17447
18436
|
events2[text2][1].type = "setextHeadingText";
|
|
17448
18437
|
if (definition2) {
|
|
17449
|
-
events2.splice(text2, 0, ["enter", heading2,
|
|
17450
|
-
events2.splice(definition2 + 1, 0, ["exit", events2[content2][1],
|
|
18438
|
+
events2.splice(text2, 0, ["enter", heading2, context2]);
|
|
18439
|
+
events2.splice(definition2 + 1, 0, ["exit", events2[content2][1], context2]);
|
|
17451
18440
|
events2[content2][1].end = {
|
|
17452
18441
|
...events2[definition2][1].end
|
|
17453
18442
|
};
|
|
17454
18443
|
} else {
|
|
17455
18444
|
events2[content2][1] = heading2;
|
|
17456
18445
|
}
|
|
17457
|
-
events2.push(["exit", heading2,
|
|
18446
|
+
events2.push(["exit", heading2, context2]);
|
|
17458
18447
|
return events2;
|
|
17459
18448
|
}
|
|
17460
18449
|
function tokenizeSetextUnderline(effects, ok2, nok) {
|
|
@@ -17588,7 +18577,7 @@ function initializeFactory(field) {
|
|
|
17588
18577
|
}
|
|
17589
18578
|
function createResolver(extraResolver) {
|
|
17590
18579
|
return resolveAllText;
|
|
17591
|
-
function resolveAllText(events2,
|
|
18580
|
+
function resolveAllText(events2, context2) {
|
|
17592
18581
|
let index2 = -1;
|
|
17593
18582
|
let enter;
|
|
17594
18583
|
while (++index2 <= events2.length) {
|
|
@@ -17606,15 +18595,15 @@ function createResolver(extraResolver) {
|
|
|
17606
18595
|
enter = void 0;
|
|
17607
18596
|
}
|
|
17608
18597
|
}
|
|
17609
|
-
return extraResolver ? extraResolver(events2,
|
|
18598
|
+
return extraResolver ? extraResolver(events2, context2) : events2;
|
|
17610
18599
|
}
|
|
17611
18600
|
}
|
|
17612
|
-
function resolveAllLineSuffixes(events2,
|
|
18601
|
+
function resolveAllLineSuffixes(events2, context2) {
|
|
17613
18602
|
let eventIndex = 0;
|
|
17614
18603
|
while (++eventIndex <= events2.length) {
|
|
17615
18604
|
if ((eventIndex === events2.length || events2[eventIndex][1].type === "lineEnding") && events2[eventIndex - 1][1].type === "data") {
|
|
17616
18605
|
const data = events2[eventIndex - 1][1];
|
|
17617
|
-
const chunks =
|
|
18606
|
+
const chunks = context2.sliceStream(data);
|
|
17618
18607
|
let index2 = chunks.length;
|
|
17619
18608
|
let bufferIndex = -1;
|
|
17620
18609
|
let size = 0;
|
|
@@ -17638,7 +18627,7 @@ function resolveAllLineSuffixes(events2, context) {
|
|
|
17638
18627
|
break;
|
|
17639
18628
|
}
|
|
17640
18629
|
}
|
|
17641
|
-
if (
|
|
18630
|
+
if (context2._contentTypeTextTrailing && eventIndex === events2.length) {
|
|
17642
18631
|
size = 0;
|
|
17643
18632
|
}
|
|
17644
18633
|
if (size) {
|
|
@@ -17661,7 +18650,7 @@ function resolveAllLineSuffixes(events2, context) {
|
|
|
17661
18650
|
if (data.start.offset === data.end.offset) {
|
|
17662
18651
|
Object.assign(data, token);
|
|
17663
18652
|
} else {
|
|
17664
|
-
events2.splice(eventIndex, 0, ["enter", token,
|
|
18653
|
+
events2.splice(eventIndex, 0, ["enter", token, context2], ["exit", token, context2]);
|
|
17665
18654
|
eventIndex += 2;
|
|
17666
18655
|
}
|
|
17667
18656
|
}
|
|
@@ -17765,7 +18754,7 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17765
18754
|
interrupt: true
|
|
17766
18755
|
})
|
|
17767
18756
|
};
|
|
17768
|
-
const
|
|
18757
|
+
const context2 = {
|
|
17769
18758
|
code: null,
|
|
17770
18759
|
containerState: {},
|
|
17771
18760
|
defineSkip,
|
|
@@ -17777,11 +18766,11 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17777
18766
|
sliceStream,
|
|
17778
18767
|
write
|
|
17779
18768
|
};
|
|
17780
|
-
let state = initialize.tokenize.call(
|
|
18769
|
+
let state = initialize.tokenize.call(context2, effects);
|
|
17781
18770
|
if (initialize.resolveAll) {
|
|
17782
18771
|
resolveAllConstructs.push(initialize);
|
|
17783
18772
|
}
|
|
17784
|
-
return
|
|
18773
|
+
return context2;
|
|
17785
18774
|
function write(slice) {
|
|
17786
18775
|
chunks = push(chunks, slice);
|
|
17787
18776
|
main();
|
|
@@ -17789,8 +18778,8 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17789
18778
|
return [];
|
|
17790
18779
|
}
|
|
17791
18780
|
addResult(initialize, 0);
|
|
17792
|
-
|
|
17793
|
-
return
|
|
18781
|
+
context2.events = resolveAll(resolveAllConstructs, context2.events, context2);
|
|
18782
|
+
return context2.events;
|
|
17794
18783
|
}
|
|
17795
18784
|
function sliceSerialize(token, expandTabs) {
|
|
17796
18785
|
return serializeChunks(sliceStream(token), expandTabs);
|
|
@@ -17860,20 +18849,20 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17860
18849
|
point2._index++;
|
|
17861
18850
|
}
|
|
17862
18851
|
}
|
|
17863
|
-
|
|
18852
|
+
context2.previous = code2;
|
|
17864
18853
|
}
|
|
17865
18854
|
function enter(type, fields) {
|
|
17866
18855
|
const token = fields || {};
|
|
17867
18856
|
token.type = type;
|
|
17868
18857
|
token.start = now();
|
|
17869
|
-
|
|
18858
|
+
context2.events.push(["enter", token, context2]);
|
|
17870
18859
|
stack.push(token);
|
|
17871
18860
|
return token;
|
|
17872
18861
|
}
|
|
17873
18862
|
function exit2(type) {
|
|
17874
18863
|
const token = stack.pop();
|
|
17875
18864
|
token.end = now();
|
|
17876
|
-
|
|
18865
|
+
context2.events.push(["exit", token, context2]);
|
|
17877
18866
|
return token;
|
|
17878
18867
|
}
|
|
17879
18868
|
function onsuccessfulconstruct(construct, info) {
|
|
@@ -17927,16 +18916,16 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17927
18916
|
info = store();
|
|
17928
18917
|
currentConstruct = construct;
|
|
17929
18918
|
if (!construct.partial) {
|
|
17930
|
-
|
|
18919
|
+
context2.currentConstruct = construct;
|
|
17931
18920
|
}
|
|
17932
|
-
if (construct.name &&
|
|
18921
|
+
if (construct.name && context2.parser.constructs.disable.null.includes(construct.name)) {
|
|
17933
18922
|
return nok();
|
|
17934
18923
|
}
|
|
17935
18924
|
return construct.tokenize.call(
|
|
17936
18925
|
// If we do have fields, create an object w/ `context` as its
|
|
17937
18926
|
// prototype.
|
|
17938
18927
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
17939
|
-
fields ? Object.assign(Object.create(
|
|
18928
|
+
fields ? Object.assign(Object.create(context2), fields) : context2,
|
|
17940
18929
|
effects,
|
|
17941
18930
|
ok2,
|
|
17942
18931
|
nok
|
|
@@ -17961,17 +18950,17 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17961
18950
|
resolveAllConstructs.push(construct);
|
|
17962
18951
|
}
|
|
17963
18952
|
if (construct.resolve) {
|
|
17964
|
-
splice(
|
|
18953
|
+
splice(context2.events, from2, context2.events.length - from2, construct.resolve(context2.events.slice(from2), context2));
|
|
17965
18954
|
}
|
|
17966
18955
|
if (construct.resolveTo) {
|
|
17967
|
-
|
|
18956
|
+
context2.events = construct.resolveTo(context2.events, context2);
|
|
17968
18957
|
}
|
|
17969
18958
|
}
|
|
17970
18959
|
function store() {
|
|
17971
18960
|
const startPoint = now();
|
|
17972
|
-
const startPrevious =
|
|
17973
|
-
const startCurrentConstruct =
|
|
17974
|
-
const startEventsIndex =
|
|
18961
|
+
const startPrevious = context2.previous;
|
|
18962
|
+
const startCurrentConstruct = context2.currentConstruct;
|
|
18963
|
+
const startEventsIndex = context2.events.length;
|
|
17975
18964
|
const startStack = Array.from(stack);
|
|
17976
18965
|
return {
|
|
17977
18966
|
from: startEventsIndex,
|
|
@@ -17979,9 +18968,9 @@ function createTokenizer(parser, initialize, from) {
|
|
|
17979
18968
|
};
|
|
17980
18969
|
function restore() {
|
|
17981
18970
|
point2 = startPoint;
|
|
17982
|
-
|
|
17983
|
-
|
|
17984
|
-
|
|
18971
|
+
context2.previous = startPrevious;
|
|
18972
|
+
context2.currentConstruct = startCurrentConstruct;
|
|
18973
|
+
context2.events.length = startEventsIndex;
|
|
17985
18974
|
stack = startStack;
|
|
17986
18975
|
accountForPotentialSkip();
|
|
17987
18976
|
}
|
|
@@ -18294,7 +19283,7 @@ function compiler(options) {
|
|
|
18294
19283
|
type: "root",
|
|
18295
19284
|
children: []
|
|
18296
19285
|
};
|
|
18297
|
-
const
|
|
19286
|
+
const context2 = {
|
|
18298
19287
|
stack: [tree],
|
|
18299
19288
|
tokenStack: [],
|
|
18300
19289
|
config,
|
|
@@ -18322,13 +19311,13 @@ function compiler(options) {
|
|
|
18322
19311
|
if (own$6.call(handler, events2[index2][1].type)) {
|
|
18323
19312
|
handler[events2[index2][1].type].call(Object.assign({
|
|
18324
19313
|
sliceSerialize: events2[index2][2].sliceSerialize
|
|
18325
|
-
},
|
|
19314
|
+
}, context2), events2[index2][1]);
|
|
18326
19315
|
}
|
|
18327
19316
|
}
|
|
18328
|
-
if (
|
|
18329
|
-
const tail =
|
|
19317
|
+
if (context2.tokenStack.length > 0) {
|
|
19318
|
+
const tail = context2.tokenStack[context2.tokenStack.length - 1];
|
|
18330
19319
|
const handler = tail[1] || defaultOnError;
|
|
18331
|
-
handler.call(
|
|
19320
|
+
handler.call(context2, void 0, tail[0]);
|
|
18332
19321
|
}
|
|
18333
19322
|
tree.position = {
|
|
18334
19323
|
start: point$1(events2.length > 0 ? events2[0][1].start : {
|
|
@@ -18580,14 +19569,14 @@ function compiler(options) {
|
|
|
18580
19569
|
tail.position.end = point$1(token.end);
|
|
18581
19570
|
}
|
|
18582
19571
|
function onexitlineending(token) {
|
|
18583
|
-
const
|
|
19572
|
+
const context2 = this.stack[this.stack.length - 1];
|
|
18584
19573
|
if (this.data.atHardBreak) {
|
|
18585
|
-
const tail =
|
|
19574
|
+
const tail = context2.children[context2.children.length - 1];
|
|
18586
19575
|
tail.position.end = point$1(token.end);
|
|
18587
19576
|
this.data.atHardBreak = void 0;
|
|
18588
19577
|
return;
|
|
18589
19578
|
}
|
|
18590
|
-
if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(
|
|
19579
|
+
if (!this.data.setextHeadingSlurpLineEnding && config.canContainEols.includes(context2.type)) {
|
|
18591
19580
|
onenterdata.call(this, token);
|
|
18592
19581
|
onexitdata.call(this, token);
|
|
18593
19582
|
}
|
|
@@ -35856,10 +36845,10 @@ function requireCore() {
|
|
|
35856
36845
|
endMultiClass(mode);
|
|
35857
36846
|
}
|
|
35858
36847
|
function compileLanguage(language2) {
|
|
35859
|
-
function langRe(value,
|
|
36848
|
+
function langRe(value, global2) {
|
|
35860
36849
|
return new RegExp(
|
|
35861
36850
|
source2(value),
|
|
35862
|
-
"m" + (language2.case_insensitive ? "i" : "") + (language2.unicodeRegex ? "u" : "") + (
|
|
36851
|
+
"m" + (language2.case_insensitive ? "i" : "") + (language2.unicodeRegex ? "u" : "") + (global2 ? "g" : "")
|
|
35863
36852
|
);
|
|
35864
36853
|
}
|
|
35865
36854
|
class MultiRegex {
|
|
@@ -36120,13 +37109,13 @@ function requireCore() {
|
|
|
36120
37109
|
if (ignoreIllegals === void 0) {
|
|
36121
37110
|
ignoreIllegals = true;
|
|
36122
37111
|
}
|
|
36123
|
-
const
|
|
37112
|
+
const context2 = {
|
|
36124
37113
|
code: code2,
|
|
36125
37114
|
language: languageName
|
|
36126
37115
|
};
|
|
36127
|
-
fire("before:highlight",
|
|
36128
|
-
const result =
|
|
36129
|
-
result.code =
|
|
37116
|
+
fire("before:highlight", context2);
|
|
37117
|
+
const result = context2.result ? context2.result : _highlight(context2.language, context2.code, ignoreIllegals);
|
|
37118
|
+
result.code = context2.code;
|
|
36130
37119
|
fire("after:highlight", result);
|
|
36131
37120
|
return result;
|
|
36132
37121
|
}
|
|
@@ -47869,7 +48858,7 @@ function tokenizePotentialGfmFootnoteCall(effects, ok2, nok) {
|
|
|
47869
48858
|
return ok2(code2);
|
|
47870
48859
|
}
|
|
47871
48860
|
}
|
|
47872
|
-
function resolveToPotentialGfmFootnoteCall(events2,
|
|
48861
|
+
function resolveToPotentialGfmFootnoteCall(events2, context2) {
|
|
47873
48862
|
let index2 = events2.length;
|
|
47874
48863
|
while (index2--) {
|
|
47875
48864
|
if (events2[index2][1].type === "labelImage" && events2[index2][0] === "enter") {
|
|
@@ -47907,22 +48896,22 @@ function resolveToPotentialGfmFootnoteCall(events2, context) {
|
|
|
47907
48896
|
// Take the `labelImageMarker` (now `data`, the `!`)
|
|
47908
48897
|
events2[index2 + 1],
|
|
47909
48898
|
events2[index2 + 2],
|
|
47910
|
-
["enter", call,
|
|
48899
|
+
["enter", call, context2],
|
|
47911
48900
|
// The `[`
|
|
47912
48901
|
events2[index2 + 3],
|
|
47913
48902
|
events2[index2 + 4],
|
|
47914
48903
|
// The `^`.
|
|
47915
|
-
["enter", marker,
|
|
47916
|
-
["exit", marker,
|
|
48904
|
+
["enter", marker, context2],
|
|
48905
|
+
["exit", marker, context2],
|
|
47917
48906
|
// Everything in between.
|
|
47918
|
-
["enter", string2,
|
|
47919
|
-
["enter", chunk,
|
|
47920
|
-
["exit", chunk,
|
|
47921
|
-
["exit", string2,
|
|
48907
|
+
["enter", string2, context2],
|
|
48908
|
+
["enter", chunk, context2],
|
|
48909
|
+
["exit", chunk, context2],
|
|
48910
|
+
["exit", string2, context2],
|
|
47922
48911
|
// The ending (`]`, properly parsed and labelled).
|
|
47923
48912
|
events2[events2.length - 2],
|
|
47924
48913
|
events2[events2.length - 1],
|
|
47925
|
-
["exit", call,
|
|
48914
|
+
["exit", call, context2]
|
|
47926
48915
|
];
|
|
47927
48916
|
events2.splice(index2, events2.length - index2 + 1, ...replacement);
|
|
47928
48917
|
return events2;
|
|
@@ -48100,7 +49089,7 @@ function gfmStrikethrough(options) {
|
|
|
48100
49089
|
null: [126]
|
|
48101
49090
|
}
|
|
48102
49091
|
};
|
|
48103
|
-
function resolveAllStrikethrough(events2,
|
|
49092
|
+
function resolveAllStrikethrough(events2, context2) {
|
|
48104
49093
|
let index2 = -1;
|
|
48105
49094
|
while (++index2 < events2.length) {
|
|
48106
49095
|
if (events2[index2][0] === "enter" && events2[index2][1].type === "strikethroughSequenceTemporary" && events2[index2][1]._close) {
|
|
@@ -48120,12 +49109,12 @@ function gfmStrikethrough(options) {
|
|
|
48120
49109
|
start: Object.assign({}, events2[open][1].end),
|
|
48121
49110
|
end: Object.assign({}, events2[index2][1].start)
|
|
48122
49111
|
};
|
|
48123
|
-
const nextEvents = [["enter", strikethrough2,
|
|
48124
|
-
const insideSpan2 =
|
|
49112
|
+
const nextEvents = [["enter", strikethrough2, context2], ["enter", events2[open][1], context2], ["exit", events2[open][1], context2], ["enter", text2, context2]];
|
|
49113
|
+
const insideSpan2 = context2.parser.constructs.insideSpan.null;
|
|
48125
49114
|
if (insideSpan2) {
|
|
48126
|
-
splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan2, events2.slice(open + 1, index2),
|
|
49115
|
+
splice(nextEvents, nextEvents.length, 0, resolveAll(insideSpan2, events2.slice(open + 1, index2), context2));
|
|
48127
49116
|
}
|
|
48128
|
-
splice(nextEvents, nextEvents.length, 0, [["exit", text2,
|
|
49117
|
+
splice(nextEvents, nextEvents.length, 0, [["exit", text2, context2], ["enter", events2[index2][1], context2], ["exit", events2[index2][1], context2], ["exit", strikethrough2, context2]]);
|
|
48129
49118
|
splice(events2, open - 1, index2 - open + 3, nextEvents);
|
|
48130
49119
|
index2 = open + nextEvents.length - 2;
|
|
48131
49120
|
break;
|
|
@@ -48498,7 +49487,7 @@ function tokenizeTable(effects, ok2, nok) {
|
|
|
48498
49487
|
return bodyRowData(code2);
|
|
48499
49488
|
}
|
|
48500
49489
|
}
|
|
48501
|
-
function resolveTable(events2,
|
|
49490
|
+
function resolveTable(events2, context2) {
|
|
48502
49491
|
let index2 = -1;
|
|
48503
49492
|
let inFirstCellAwaitingPipe = true;
|
|
48504
49493
|
let rowKind = 0;
|
|
@@ -48517,7 +49506,7 @@ function resolveTable(events2, context) {
|
|
|
48517
49506
|
if (token.type === "tableHead") {
|
|
48518
49507
|
afterHeadAwaitingFirstBodyRow = false;
|
|
48519
49508
|
if (lastTableEnd !== 0) {
|
|
48520
|
-
flushTableEnd(map2,
|
|
49509
|
+
flushTableEnd(map2, context2, lastTableEnd, currentTable, currentBody);
|
|
48521
49510
|
currentBody = void 0;
|
|
48522
49511
|
lastTableEnd = 0;
|
|
48523
49512
|
}
|
|
@@ -48527,7 +49516,7 @@ function resolveTable(events2, context) {
|
|
|
48527
49516
|
// Note: correct end is set later.
|
|
48528
49517
|
end: Object.assign({}, token.end)
|
|
48529
49518
|
};
|
|
48530
|
-
map2.add(index2, 0, [["enter", currentTable,
|
|
49519
|
+
map2.add(index2, 0, [["enter", currentTable, context2]]);
|
|
48531
49520
|
} else if (token.type === "tableRow" || token.type === "tableDelimiterRow") {
|
|
48532
49521
|
inFirstCellAwaitingPipe = true;
|
|
48533
49522
|
currentCell = void 0;
|
|
@@ -48541,7 +49530,7 @@ function resolveTable(events2, context) {
|
|
|
48541
49530
|
// Note: correct end is set later.
|
|
48542
49531
|
end: Object.assign({}, token.end)
|
|
48543
49532
|
};
|
|
48544
|
-
map2.add(index2, 0, [["enter", currentBody,
|
|
49533
|
+
map2.add(index2, 0, [["enter", currentBody, context2]]);
|
|
48545
49534
|
}
|
|
48546
49535
|
rowKind = token.type === "tableDelimiterRow" ? 2 : currentBody ? 3 : 1;
|
|
48547
49536
|
} else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
|
|
@@ -48549,7 +49538,7 @@ function resolveTable(events2, context) {
|
|
|
48549
49538
|
if (cell2[2] === 0) {
|
|
48550
49539
|
if (lastCell[1] !== 0) {
|
|
48551
49540
|
cell2[0] = cell2[1];
|
|
48552
|
-
currentCell = flushCell(map2,
|
|
49541
|
+
currentCell = flushCell(map2, context2, lastCell, rowKind, void 0, currentCell);
|
|
48553
49542
|
lastCell = [0, 0, 0, 0];
|
|
48554
49543
|
}
|
|
48555
49544
|
cell2[2] = index2;
|
|
@@ -48560,7 +49549,7 @@ function resolveTable(events2, context) {
|
|
|
48560
49549
|
} else {
|
|
48561
49550
|
if (lastCell[1] !== 0) {
|
|
48562
49551
|
cell2[0] = cell2[1];
|
|
48563
|
-
currentCell = flushCell(map2,
|
|
49552
|
+
currentCell = flushCell(map2, context2, lastCell, rowKind, void 0, currentCell);
|
|
48564
49553
|
}
|
|
48565
49554
|
lastCell = cell2;
|
|
48566
49555
|
cell2 = [lastCell[1], index2, 0, 0];
|
|
@@ -48573,9 +49562,9 @@ function resolveTable(events2, context) {
|
|
|
48573
49562
|
lastTableEnd = index2;
|
|
48574
49563
|
if (lastCell[1] !== 0) {
|
|
48575
49564
|
cell2[0] = cell2[1];
|
|
48576
|
-
currentCell = flushCell(map2,
|
|
49565
|
+
currentCell = flushCell(map2, context2, lastCell, rowKind, index2, currentCell);
|
|
48577
49566
|
} else if (cell2[1] !== 0) {
|
|
48578
|
-
currentCell = flushCell(map2,
|
|
49567
|
+
currentCell = flushCell(map2, context2, cell2, rowKind, index2, currentCell);
|
|
48579
49568
|
}
|
|
48580
49569
|
rowKind = 0;
|
|
48581
49570
|
} else if (rowKind && (token.type === "data" || token.type === "tableDelimiterMarker" || token.type === "tableDelimiterFiller")) {
|
|
@@ -48583,45 +49572,45 @@ function resolveTable(events2, context) {
|
|
|
48583
49572
|
}
|
|
48584
49573
|
}
|
|
48585
49574
|
if (lastTableEnd !== 0) {
|
|
48586
|
-
flushTableEnd(map2,
|
|
49575
|
+
flushTableEnd(map2, context2, lastTableEnd, currentTable, currentBody);
|
|
48587
49576
|
}
|
|
48588
|
-
map2.consume(
|
|
49577
|
+
map2.consume(context2.events);
|
|
48589
49578
|
index2 = -1;
|
|
48590
|
-
while (++index2 <
|
|
48591
|
-
const event =
|
|
49579
|
+
while (++index2 < context2.events.length) {
|
|
49580
|
+
const event = context2.events[index2];
|
|
48592
49581
|
if (event[0] === "enter" && event[1].type === "table") {
|
|
48593
|
-
event[1]._align = gfmTableAlign(
|
|
49582
|
+
event[1]._align = gfmTableAlign(context2.events, index2);
|
|
48594
49583
|
}
|
|
48595
49584
|
}
|
|
48596
49585
|
return events2;
|
|
48597
49586
|
}
|
|
48598
|
-
function flushCell(map2,
|
|
49587
|
+
function flushCell(map2, context2, range, rowKind, rowEnd, previousCell) {
|
|
48599
49588
|
const groupName = rowKind === 1 ? "tableHeader" : rowKind === 2 ? "tableDelimiter" : "tableData";
|
|
48600
49589
|
const valueName = "tableContent";
|
|
48601
49590
|
if (range[0] !== 0) {
|
|
48602
|
-
previousCell.end = Object.assign({}, getPoint(
|
|
48603
|
-
map2.add(range[0], 0, [["exit", previousCell,
|
|
49591
|
+
previousCell.end = Object.assign({}, getPoint(context2.events, range[0]));
|
|
49592
|
+
map2.add(range[0], 0, [["exit", previousCell, context2]]);
|
|
48604
49593
|
}
|
|
48605
|
-
const now = getPoint(
|
|
49594
|
+
const now = getPoint(context2.events, range[1]);
|
|
48606
49595
|
previousCell = {
|
|
48607
49596
|
type: groupName,
|
|
48608
49597
|
start: Object.assign({}, now),
|
|
48609
49598
|
// Note: correct end is set later.
|
|
48610
49599
|
end: Object.assign({}, now)
|
|
48611
49600
|
};
|
|
48612
|
-
map2.add(range[1], 0, [["enter", previousCell,
|
|
49601
|
+
map2.add(range[1], 0, [["enter", previousCell, context2]]);
|
|
48613
49602
|
if (range[2] !== 0) {
|
|
48614
|
-
const relatedStart = getPoint(
|
|
48615
|
-
const relatedEnd = getPoint(
|
|
49603
|
+
const relatedStart = getPoint(context2.events, range[2]);
|
|
49604
|
+
const relatedEnd = getPoint(context2.events, range[3]);
|
|
48616
49605
|
const valueToken = {
|
|
48617
49606
|
type: valueName,
|
|
48618
49607
|
start: Object.assign({}, relatedStart),
|
|
48619
49608
|
end: Object.assign({}, relatedEnd)
|
|
48620
49609
|
};
|
|
48621
|
-
map2.add(range[2], 0, [["enter", valueToken,
|
|
49610
|
+
map2.add(range[2], 0, [["enter", valueToken, context2]]);
|
|
48622
49611
|
if (rowKind !== 2) {
|
|
48623
|
-
const start =
|
|
48624
|
-
const end =
|
|
49612
|
+
const start = context2.events[range[2]];
|
|
49613
|
+
const end = context2.events[range[3]];
|
|
48625
49614
|
start[1].end = Object.assign({}, end[1].end);
|
|
48626
49615
|
start[1].type = "chunkText";
|
|
48627
49616
|
start[1].contentType = "text";
|
|
@@ -48631,24 +49620,24 @@ function flushCell(map2, context, range, rowKind, rowEnd, previousCell) {
|
|
|
48631
49620
|
map2.add(a, b, []);
|
|
48632
49621
|
}
|
|
48633
49622
|
}
|
|
48634
|
-
map2.add(range[3] + 1, 0, [["exit", valueToken,
|
|
49623
|
+
map2.add(range[3] + 1, 0, [["exit", valueToken, context2]]);
|
|
48635
49624
|
}
|
|
48636
49625
|
if (rowEnd !== void 0) {
|
|
48637
|
-
previousCell.end = Object.assign({}, getPoint(
|
|
48638
|
-
map2.add(rowEnd, 0, [["exit", previousCell,
|
|
49626
|
+
previousCell.end = Object.assign({}, getPoint(context2.events, rowEnd));
|
|
49627
|
+
map2.add(rowEnd, 0, [["exit", previousCell, context2]]);
|
|
48639
49628
|
previousCell = void 0;
|
|
48640
49629
|
}
|
|
48641
49630
|
return previousCell;
|
|
48642
49631
|
}
|
|
48643
|
-
function flushTableEnd(map2,
|
|
49632
|
+
function flushTableEnd(map2, context2, index2, table2, tableBody) {
|
|
48644
49633
|
const exits = [];
|
|
48645
|
-
const related = getPoint(
|
|
49634
|
+
const related = getPoint(context2.events, index2);
|
|
48646
49635
|
if (tableBody) {
|
|
48647
49636
|
tableBody.end = Object.assign({}, related);
|
|
48648
|
-
exits.push(["exit", tableBody,
|
|
49637
|
+
exits.push(["exit", tableBody, context2]);
|
|
48649
49638
|
}
|
|
48650
49639
|
table2.end = Object.assign({}, related);
|
|
48651
|
-
exits.push(["exit", table2,
|
|
49640
|
+
exits.push(["exit", table2, context2]);
|
|
48652
49641
|
map2.add(index2 + 1, 0, exits);
|
|
48653
49642
|
}
|
|
48654
49643
|
function getPoint(events2, index2) {
|
|
@@ -48758,9 +49747,9 @@ var roundNumber = function(num, decimal) {
|
|
|
48758
49747
|
var checkIsNumber = function(num, defaultValue2) {
|
|
48759
49748
|
return defaultValue2;
|
|
48760
49749
|
};
|
|
48761
|
-
var handleCallback = function(
|
|
49750
|
+
var handleCallback = function(context2, event, callback) {
|
|
48762
49751
|
if (callback && typeof callback === "function") {
|
|
48763
|
-
callback(
|
|
49752
|
+
callback(context2, event);
|
|
48764
49753
|
}
|
|
48765
49754
|
};
|
|
48766
49755
|
var easeOut = function(t) {
|
|
@@ -53684,8 +54673,8 @@ function PanelWithForwardedRef({
|
|
|
53684
54673
|
tagName: Type = "div",
|
|
53685
54674
|
...rest
|
|
53686
54675
|
}) {
|
|
53687
|
-
const
|
|
53688
|
-
if (
|
|
54676
|
+
const context2 = useContext(PanelGroupContext);
|
|
54677
|
+
if (context2 === null) {
|
|
53689
54678
|
throw Error(`Panel components must be rendered within a PanelGroup container`);
|
|
53690
54679
|
}
|
|
53691
54680
|
const {
|
|
@@ -53699,7 +54688,7 @@ function PanelWithForwardedRef({
|
|
|
53699
54688
|
registerPanel,
|
|
53700
54689
|
resizePanel: resizePanel2,
|
|
53701
54690
|
unregisterPanel
|
|
53702
|
-
} =
|
|
54691
|
+
} = context2;
|
|
53703
54692
|
const panelId = useUniqueId(idFromProps);
|
|
53704
54693
|
const panelDataRef = useRef({
|
|
53705
54694
|
callbacks: {
|
|
@@ -55163,7 +56152,7 @@ function PanelGroupWithForwardedRef({
|
|
|
55163
56152
|
forceUpdate();
|
|
55164
56153
|
}
|
|
55165
56154
|
}, [forceUpdate]);
|
|
55166
|
-
const
|
|
56155
|
+
const context2 = useMemo(() => ({
|
|
55167
56156
|
collapsePanel,
|
|
55168
56157
|
direction,
|
|
55169
56158
|
dragState,
|
|
@@ -55190,7 +56179,7 @@ function PanelGroupWithForwardedRef({
|
|
|
55190
56179
|
width: "100%"
|
|
55191
56180
|
};
|
|
55192
56181
|
return createElement(PanelGroupContext.Provider, {
|
|
55193
|
-
value:
|
|
56182
|
+
value: context2
|
|
55194
56183
|
}, createElement(Type, {
|
|
55195
56184
|
...rest,
|
|
55196
56185
|
children: children2,
|
|
@@ -55479,7 +56468,7 @@ const StatusBadge = ({ status }) => {
|
|
|
55479
56468
|
}
|
|
55480
56469
|
);
|
|
55481
56470
|
};
|
|
55482
|
-
const TaskDetailPanel = ({ context
|
|
56471
|
+
const TaskDetailPanel = ({ context: context2, events: events2, config }) => {
|
|
55483
56472
|
var _a;
|
|
55484
56473
|
const { theme: theme2 } = useTheme();
|
|
55485
56474
|
const [selectedTask, setSelectedTask] = useState(null);
|
|
@@ -55496,7 +56485,7 @@ const TaskDetailPanel = ({ context, actions, events: events2, config }) => {
|
|
|
55496
56485
|
return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
|
|
55497
56486
|
}
|
|
55498
56487
|
);
|
|
55499
|
-
const repoCapabilities =
|
|
56488
|
+
const repoCapabilities = context2.getRepositorySlice("repoCapabilities");
|
|
55500
56489
|
const hasClaudeWorkflow = ((_a = repoCapabilities == null ? void 0 : repoCapabilities.data) == null ? void 0 : _a.hasClaudeWorkflow) ?? false;
|
|
55501
56490
|
const handleAssignToClaude = useCallback(() => {
|
|
55502
56491
|
if (!events2 || !selectedTask) return;
|
|
@@ -56364,11 +57353,11 @@ const panels = [
|
|
|
56364
57353
|
},
|
|
56365
57354
|
component: KanbanPanel,
|
|
56366
57355
|
// Optional: Called when this specific panel is mounted
|
|
56367
|
-
onMount: async (
|
|
57356
|
+
onMount: async (context2) => {
|
|
56368
57357
|
var _a;
|
|
56369
57358
|
console.log(
|
|
56370
57359
|
"Kanban Panel mounted",
|
|
56371
|
-
(_a =
|
|
57360
|
+
(_a = context2.currentScope.repository) == null ? void 0 : _a.path
|
|
56372
57361
|
);
|
|
56373
57362
|
},
|
|
56374
57363
|
// Optional: Called when this specific panel is unmounted
|
|
@@ -56389,11 +57378,11 @@ const panels = [
|
|
|
56389
57378
|
},
|
|
56390
57379
|
component: TaskDetailPanel,
|
|
56391
57380
|
// Optional: Called when this specific panel is mounted
|
|
56392
|
-
onMount: async (
|
|
57381
|
+
onMount: async (context2) => {
|
|
56393
57382
|
var _a;
|
|
56394
57383
|
console.log(
|
|
56395
57384
|
"Task Detail Panel mounted",
|
|
56396
|
-
(_a =
|
|
57385
|
+
(_a = context2.currentScope.repository) == null ? void 0 : _a.path
|
|
56397
57386
|
);
|
|
56398
57387
|
},
|
|
56399
57388
|
// Optional: Called when this specific panel is unmounted
|