完成世界书、骰子、apiconfig页面处理

This commit is contained in:
2026-04-30 01:35:10 +08:00
parent a3e3711b2b
commit ba9b925c32
4602 changed files with 785225 additions and 23 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,2 @@
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n="undefined"!=typeof globalThis?globalThis:n||self).InlineStyleParser=e()}(this,(function(){"use strict";var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,t=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,f="";function s(n){return n?n.replace(c,f):f}return function(c,a){if("string"!=typeof c)throw new TypeError("First argument must be a string");if(!c)return[];a=a||{};var l=1,p=1;function h(n){var r=n.match(e);r&&(l+=r.length);var t=n.lastIndexOf("\n");p=~t?n.length-t:p+n.length}function m(){var n={line:l,column:p};return function(e){return e.position=new v(n),y(),e}}function v(n){this.start=n,this.end={line:l,column:p},this.source=a.source}function d(n){var e=new Error(a.source+":"+l+":"+p+": "+n);if(e.reason=n,e.filename=a.source,e.line=l,e.column=p,e.source=c,!a.silent)throw e}function g(n){var e=n.exec(c);if(e){var r=e[0];return h(r),c=c.slice(r.length),e}}function y(){g(r)}function w(n){var e;for(n=n||[];e=A();)!1!==e&&n.push(e);return n}function A(){var n=m();if("/"==c.charAt(0)&&"*"==c.charAt(1)){for(var e=2;f!=c.charAt(e)&&("*"!=c.charAt(e)||"/"!=c.charAt(e+1));)++e;if(e+=2,f===c.charAt(e-1))return d("End of comment missing");var r=c.slice(2,e-2);return p+=2,h(r),c=c.slice(e),p+=2,n({type:"comment",comment:r})}}function b(){var e=m(),r=g(t);if(r){if(A(),!g(o))return d("property missing ':'");var c=g(i),a=e({type:"declaration",property:s(r[0].replace(n,f)),value:c?s(c[0].replace(n,f)):f});return g(u),a}}return v.prototype.content=c,y(),function(){var n,e=[];for(w(e);n=b();)!1!==n&&(e.push(n),w(e));return e}()}}));
//# sourceMappingURL=inline-style-parser.min.js.map

View File

@@ -0,0 +1,34 @@
interface Position {
start: {
line: number;
column: number;
};
end: {
line: number;
column: number;
};
source?: string;
}
export interface Declaration {
type: 'declaration';
property: string;
value: string;
position: Position;
}
export interface Comment {
type: 'comment';
comment: string;
position: Position;
}
interface Options {
source?: string;
silent?: boolean;
}
export default function InlineStyleParser(
style: string,
options?: Options
): (Declaration | Comment)[];