- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
50 lines
1.6 KiB
JavaScript
50 lines
1.6 KiB
JavaScript
"use strict";
|
|
var __defProp = Object.defineProperty;
|
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
var __export = (target, all) => {
|
|
for (var name in all)
|
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
};
|
|
var __copyProps = (to, from, except, desc) => {
|
|
if (from && typeof from === "object" || typeof from === "function") {
|
|
for (let key of __getOwnPropNames(from))
|
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
}
|
|
return to;
|
|
};
|
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
var matcher_exports = {};
|
|
__export(matcher_exports, {
|
|
emptyParam: () => emptyParam,
|
|
match: () => match
|
|
});
|
|
module.exports = __toCommonJS(matcher_exports);
|
|
var import_router = require("../../router");
|
|
const emptyParam = [];
|
|
function match(method, path) {
|
|
const matchers = this.buildAllMatchers();
|
|
const match2 = ((method2, path2) => {
|
|
const matcher = matchers[method2] || matchers[import_router.METHOD_NAME_ALL];
|
|
const staticMatch = matcher[2][path2];
|
|
if (staticMatch) {
|
|
return staticMatch;
|
|
}
|
|
const match3 = path2.match(matcher[0]);
|
|
if (!match3) {
|
|
return [[], emptyParam];
|
|
}
|
|
const index = match3.indexOf("", 1);
|
|
return [matcher[1][index], match3];
|
|
});
|
|
this.match = match2;
|
|
return match2(method, path);
|
|
}
|
|
// Annotate the CommonJS export names for ESM import in node:
|
|
0 && (module.exports = {
|
|
emptyParam,
|
|
match
|
|
});
|