Files
bruno ff99b8eb2b feat: 论文级博客系统 - 完整数学公式与高级代码展示
📚 论文级功能实现:
- ✅ KaTeX数学公式渲染系统 (内联$...1411...1411)
- ✅ 高级代码高亮 (行号、标题、语法着色)
- ✅ PWA渐进式Web应用支持
- ✅ 多语言代码支持 (20+编程语言)
- ✅ 代码行标注系统 (错误/成功/警告/高亮)

🧮 数学公式系统:
- LaTeX语法完整支持
- 数学宏定义 (\RR, \NN, \ZZ, \QQ, \CC等)
- 复杂公式渲染 (矩阵、积分、求和、分数)
- 响应式数学表达式
- 黑暗模式数学公式适配

💻 高级代码展示:
- 代码块标题显示
- 行号自动生成
- 语法高亮增强
- 多行高亮标注
- 错误/成功/警告行标记
- 20+编程语言支持

🔧 企业级插件:
- @docusaurus/plugin-pwa (离线支持)
- rehype-katex (数学公式)
- remark-math (数学语法)
- remark-gfm (GitHub风格Markdown)
- prism-react-renderer (代码高亮)

📊 算法示例升级:
- Transformer深度学习模型
- 多头注意力机制实现
- 完整的神经网络架构
- 专业文档注释
- 类型提示和错误处理

🎨 视觉优化:
- 数学公式背景框
- 代码行高亮动画
- 专业配色方案
- 渐变边框效果
- 响应式设计适配

📱 PWA功能:
- 离线访问支持
- 应用图标配置
- 清单文件完整
- 主题色统一
- 安装提示优化

🚀 性能优化:
- 图片质量提升至85%
- 代码分割优化
- 字体预加载
- CSS变量系统
- GPU加速渲染

✨ 用户体验:
- 论文级排版标准
- 学术引用格式
- 专业视觉层次
- 无障碍访问支持
- 多设备完美适配
2025-07-20 06:51:21 +08:00

71 lines
3.3 KiB
JavaScript

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = cargo;
var _queue = require('./internal/queue.js');
var _queue2 = _interopRequireDefault(_queue);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
* Creates a `cargoQueue` object with the specified payload. Tasks added to the
* cargoQueue will be processed together (up to the `payload` limit) in `concurrency` parallel workers.
* If the all `workers` are in progress, the task is queued until one becomes available. Once
* a `worker` has completed some tasks, each callback of those tasks is
* called. Check out [these](https://camo.githubusercontent.com/6bbd36f4cf5b35a0f11a96dcd2e97711ffc2fb37/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130382f62626330636662302d356632392d313165322d393734662d3333393763363464633835382e676966) [animations](https://camo.githubusercontent.com/f4810e00e1c5f5f8addbe3e9f49064fd5d102699/68747470733a2f2f662e636c6f75642e6769746875622e636f6d2f6173736574732f313637363837312f36383130312f38346339323036362d356632392d313165322d383134662d3964336430323431336266642e676966)
* for how `cargo` and `queue` work.
*
* While [`queue`]{@link module:ControlFlow.queue} passes only one task to one of a group of workers
* at a time, and [`cargo`]{@link module:ControlFlow.cargo} passes an array of tasks to a single worker,
* the cargoQueue passes an array of tasks to multiple parallel workers.
*
* @name cargoQueue
* @static
* @memberOf module:ControlFlow
* @method
* @see [async.queue]{@link module:ControlFlow.queue}
* @see [async.cargo]{@link module:ControlFLow.cargo}
* @category Control Flow
* @param {AsyncFunction} worker - An asynchronous function for processing an array
* of queued tasks. Invoked with `(tasks, callback)`.
* @param {number} [concurrency=1] - An `integer` for determining how many
* `worker` functions should be run in parallel. If omitted, the concurrency
* defaults to `1`. If the concurrency is `0`, an error is thrown.
* @param {number} [payload=Infinity] - An optional `integer` for determining
* how many tasks should be processed per round; if omitted, the default is
* unlimited.
* @returns {module:ControlFlow.QueueObject} A cargoQueue object to manage the tasks. Callbacks can
* attached as certain properties to listen for specific events during the
* lifecycle of the cargoQueue and inner queue.
* @example
*
* // create a cargoQueue object with payload 2 and concurrency 2
* var cargoQueue = async.cargoQueue(function(tasks, callback) {
* for (var i=0; i<tasks.length; i++) {
* console.log('hello ' + tasks[i].name);
* }
* callback();
* }, 2, 2);
*
* // add some items
* cargoQueue.push({name: 'foo'}, function(err) {
* console.log('finished processing foo');
* });
* cargoQueue.push({name: 'bar'}, function(err) {
* console.log('finished processing bar');
* });
* cargoQueue.push({name: 'baz'}, function(err) {
* console.log('finished processing baz');
* });
* cargoQueue.push({name: 'boo'}, function(err) {
* console.log('finished processing boo');
* });
*/
function cargo(worker, concurrency, payload) {
return (0, _queue2.default)(worker, concurrency, payload);
}
module.exports = exports.default;