首次提交
This commit is contained in:
17 files changed
+395
No files matched your search
@@ -0,0 +1 @@
|
||||
.idea
|
||||
@@ -0,0 +1,34 @@
|
||||
# Messenger SDK 开发文档
|
||||
|
||||
感谢您的访问.
|
||||
本站旨在为Messenger开发者提供清晰的入门资料.
|
||||
|
||||
## 版权声明
|
||||
本站内容作者为 Ling 和为本项目贡献内容、提出意见的朋友. 部分文献资料若涉及转载或引用, 将会在相关内容处标记.
|
||||
|
||||
文档中代码均以Apache 2.0开源, 包括正文部分插入代码.
|
||||
本作品采用知识共享署名-非商业性使用-禁止演绎 3.0 中国大陆许可协议进行许可。
|
||||
|
||||
若需转载任何内容, 请详细注明出处, 仅供学习交流使用, 谢绝商业化使用.
|
||||
|
||||
本站图片资源部分来自互联网,仅学习交流使用. 部分图片由 Ling 绘制.
|
||||
|
||||
|
||||
## 前言
|
||||
|
||||
SDK使用C++编写,使用Messenger SDK需要一定的C++基础。
|
||||
如果你对C++还一知半解,那么阅读文档会比较吃力,建议有了一定水平以后再来阅读。
|
||||
|
||||
在本章节之后,我们假定你已经掌握了C++的基本语法,除了一些较为难以理解的部分之外,不会过多赘述语法上的问题,望理解。
|
||||
|
||||
|
||||
|
||||
## 免责声明
|
||||
|
||||
本文档仅仅用来指导您如何使用Messenger SDK,我们对您使用Messenger SDK进行的一切行为不承担任何责任,
|
||||
由此导致的一切后果由您自行承担。
|
||||
如果您不能认可以上内容,请立即**关闭此文档**。
|
||||
|
||||
当您打开本章节之后的内容,我们视为你已经认可了我们的免责声明。
|
||||
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# 快速入门
|
||||
|
||||
Messenger SDK一般是一个如下格式的压缩包
|
||||
|
||||
/libs
|
||||
/arm64-v8a
|
||||
/x86-64
|
||||
/Windows
|
||||
/Linux
|
||||
...
|
||||
/include
|
||||
...
|
||||
|
||||
|
||||
其中,libs下放置的是一些静态连接库,包含Android、Linux以及Windows。你需要将这些静态链接库链接到您的项目中,
|
||||
并且在您项目的头文件搜索路径中添加 *include* 文件夹。
|
||||
|
||||
然后,你将可以使用Messenger的API了。
|
||||
|
||||
## 使用方法
|
||||
|
||||
Messenger SDK的主要class是 ling::Messenger ,它提供了服务器全部API的抽象。
|
||||
它由ling::Client派生而来,ling::Client实现了服务器的通讯协议,包括STL握手过程。
|
||||
|
||||
> ling::Messenger以及ling::Client,都具有ling前缀,在C++中,这叫命名空间(*namespace*)。SDK内全部的class都在ling命名空间下。
|
||||
|
||||
|
||||
ling::Messenger将是您接触最多的class。
|
||||
它有两个构造函数:
|
||||
|
||||
~~~cpp
|
||||
namespace ling{
|
||||
class Messenger : public Client {
|
||||
public:
|
||||
/**
|
||||
* 创建一个Messenger实例,创建实例时,即连接到Server。
|
||||
*
|
||||
* @param host 服务器host
|
||||
* @param port 端口号
|
||||
* @param projectId 项目id
|
||||
* @throw ConnectException 在连接失败时
|
||||
*/
|
||||
Messenger(std::string host, int port, uint64_t projectId);
|
||||
|
||||
/**
|
||||
* 此重载相比上面的定义,额外需要一个deviceUid参数。
|
||||
* 这是设备识别码,上面的实现将会自动读取设备识别码,但是可能不会唯一
|
||||
* 扛攻击的能力较弱,如果设备拥有root权限则很可能被修改
|
||||
* 所以,如果你有更加适合你需求的方案识别设备,将它作为第四个参数传递进来!
|
||||
*
|
||||
* @param host 服务器host
|
||||
* @param port 端口号
|
||||
* @param projectId 项目id
|
||||
* @param deviceUid 设备识别码
|
||||
* @throw ConnectException 在连接失败时
|
||||
*/
|
||||
Messenger(std::string host, int port, uint64_t projectId, std::string deviceUid);
|
||||
};
|
||||
}
|
||||
~~~
|
||||
|
||||
> 以后您会经常看到像这样的声明,提前熟悉它!
|
||||
|
||||
在Messenger创建完毕后,你可以通过它来和服务器交互。
|
||||
|
||||
## 范例
|
||||
|
||||
~~~ cpp
|
||||
//别忘了导入定义!
|
||||
#include <Messenger.h>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
//因为Messenger每次创建都会连接到服务器
|
||||
//所以你不能每次和服务器交互都创建一个实例,而是必须复用!
|
||||
//此处使用一个智能指针来管理Messenger的实例
|
||||
//手动将没有初始值的指针赋值为nullptr,这是一个良好的编程习惯。
|
||||
static std::shared_ptr<ling::Messenger> api = nullptr;
|
||||
|
||||
int main(void){
|
||||
try{
|
||||
//这里使用make_shared自动构造智能指针
|
||||
::api = std::make_shared<ling::Messenger>("127.0.0.1",2019,1);
|
||||
//在此时已经成功连接到服务器,可以进行交互。
|
||||
//注意,交互之前必须进行设备注册,这个后面的章节在说。
|
||||
} catch (const ling::ConnectException & e){
|
||||
//还记得上面的声明中提到连接失败时会抛出ConnectException吗?
|
||||
std::cerr << "连接服务器失败" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
~~~
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
# 异常
|
||||
@@ -0,0 +1,9 @@
|
||||
/*!
|
||||
* docsify-copy-code
|
||||
* v2.1.1
|
||||
* https://github.com/jperasmus/docsify-copy-code
|
||||
* (c) 2017-2020 JP Erasmus <jperasmus11@gmail.com>
|
||||
* MIT license
|
||||
*/
|
||||
!function(){"use strict";function s(o){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(o,e){void 0===e&&(e={});var t=e.insertAt;if(o&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.type="text/css","top"===t&&n.firstChild?n.insertBefore(c,n.firstChild):n.appendChild(c),c.styleSheet?c.styleSheet.cssText=o:c.appendChild(document.createTextNode(o))}}(".docsify-copy-code-button,.docsify-copy-code-button span{cursor:pointer;transition:all .25s ease}.docsify-copy-code-button{position:absolute;z-index:1;top:0;right:0;overflow:visible;padding:.65em .8em;border:0;border-radius:0;outline:0;font-size:1em;background:grey;background:var(--theme-color,grey);color:#fff;opacity:0}.docsify-copy-code-button span{border-radius:3px;background:inherit;pointer-events:none}.docsify-copy-code-button .error,.docsify-copy-code-button .success{position:absolute;z-index:-100;top:50%;right:0;padding:.5em .65em;font-size:.825em;opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.docsify-copy-code-button.error .error,.docsify-copy-code-button.success .success{right:100%;opacity:1;-webkit-transform:translate(-115%,-50%);transform:translate(-115%,-50%)}.docsify-copy-code-button:focus,pre:hover .docsify-copy-code-button{opacity:1}"),document.querySelector('link[href*="docsify-copy-code"]')&&console.warn("[Deprecation] Link to external docsify-copy-code stylesheet is no longer necessary."),window.DocsifyCopyCodePlugin={init:function(){return function(o,e){o.ready(function(){console.warn("[Deprecation] Manually initializing docsify-copy-code using window.DocsifyCopyCodePlugin.init() is no longer necessary.")})}}},window.$docsify=window.$docsify||{},window.$docsify.plugins=[function(o,r){o.doneEach(function(){var o=Array.apply(null,document.querySelectorAll("pre[data-lang]")),c={buttonText:"复制代码",errorText:"Error",successText:"Copied"};r.config.copyCode&&Object.keys(c).forEach(function(t){var n=r.config.copyCode[t];"string"==typeof n?c[t]=n:"object"===s(n)&&Object.keys(n).some(function(o){var e=-1<location.href.indexOf(o);return c[t]=e?n[o]:c[t],e})});var e=['<button class="docsify-copy-code-button">','<span class="label">'.concat(c.buttonText,"</span>"),'<span class="error">'.concat(c.errorText,"</span>"),'<span class="success">'.concat(c.successText,"</span>"),"</button>"].join("");o.forEach(function(o){o.insertAdjacentHTML("beforeend",e)})}),o.mounted(function(){document.querySelector(".content").addEventListener("click",function(o){if(o.target.classList.contains("docsify-copy-code-button")){var e="BUTTON"===o.target.tagName?o.target:o.target.parentNode,t=document.createRange(),n=e.parentNode.querySelector("code"),c=window.getSelection();t.selectNode(n),c.removeAllRanges(),c.addRange(t);try{document.execCommand("copy")&&(e.classList.add("success"),setTimeout(function(){e.classList.remove("success")},1e3))}catch(o){console.error("docsify-copy-code: ".concat(o)),e.classList.add("error"),setTimeout(function(){e.classList.remove("error")},1e3)}"function"==typeof(c=window.getSelection()).removeRange?c.removeRange(t):"function"==typeof c.removeAllRanges&&c.removeAllRanges()}})})}].concat(window.$docsify.plugins||[])}();
|
||||
//# sourceMappingURL=docsify-copy-code.min.js.map
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(t){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var i="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(t,e){return t(e={exports:{}},e.exports),e.exports}var c=t(function(t,e){function n(t,e){return e.querySelector(t)}(e=t.exports=function(t,e){return n(t,e=e||document)}).all=function(t,e){return(e=e||document).querySelectorAll(t)},e.engine=function(t){if(!t.one)throw new Error(".one callback required");if(t.all)return n=t.one,e.all=t.all,e;throw new Error(".all callback required")}}),e=(c.all,c.engine,t(function(e){var n=eval;try{n("export default global")}catch(t){try{n("export default self")}catch(t){try{e.exports=i}catch(t){try{self.global=self}catch(t){window.global=window}}}}}));try{var a=c}catch(t){a=c}var e=e.Element,e=e&&e.prototype||{},r=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,s=function(t,e){if(!t||1!==t.nodeType)return!1;if(r)return r.call(t,e);for(var n=a.all(e,t.parentNode),i=0;i<n.length;++i)if(n[i]==t)return!0;return!1};try{var o=s}catch(t){o=s}var p=function(t,e,n){n=n||document.documentElement;for(;t&&t!==n;){if(o(t,e))return t;t=t.parentNode}return o(t,e)?t:null};e=".docsify-pagination-container{display:flex;flex-wrap:wrap;justify-content:space-between;overflow:hidden;margin:5em 0 1em;border-top:1px solid rgba(0,0,0,.07)}.pagination-item{margin-top:2.5em}.pagination-item a,.pagination-item a:hover{text-decoration:none}.pagination-item a{color:currentColor}.pagination-item a:hover .pagination-item-title{text-decoration:underline}.pagination-item:not(:last-child) a .pagination-item-label,.pagination-item:not(:last-child) a .pagination-item-subtitle,.pagination-item:not(:last-child) a .pagination-item-title{opacity:.3;transition:all .2s}.pagination-item:last-child .pagination-item-label,.pagination-item:not(:last-child) a:hover .pagination-item-label{opacity:.6}.pagination-item:not(:last-child) a:hover .pagination-item-title{opacity:1}.pagination-item-label{font-size:.8em}.pagination-item-label>*{line-height:1;vertical-align:middle}.pagination-item-label svg{height:.8em;width:auto;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1px}.pagination-item--next{margin-left:auto;text-align:right}.pagination-item--next svg{margin-left:.5em}.pagination-item--previous svg{margin-right:.5em}.pagination-item-title{font-size:1.6em}.pagination-item-subtitle{text-transform:uppercase;opacity:.3}",u=(u=void 0===u?{}:u).insertAt,e&&"undefined"!=typeof document&&(n=document.head||document.getElementsByTagName("head")[0],(l=document.createElement("style")).type="text/css","top"===u&&n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e)));var n,l,u=function(t,e,n){return e&&f(t.prototype,e),n&&f(t,n),t};function f(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n,i=arguments[e];for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},h="docsify-pagination-container";function g(t){return Array.prototype.slice.call(t)}function m(t){return t.href?t:c("a",t)}function v(t){return t&&"#/README"===t.toUpperCase()?"#/":t}function x(e,t){return 1===arguments.length?function(t){return x(e,t)}:v(decodeURIComponent(t.getAttribute("href").split("?")[0]))===v(decodeURIComponent(e))}u(w,[{key:"toJSON",value:function(){if(this.hyperlink)return{name:this.hyperlink.innerText,href:this.hyperlink.getAttribute("href"),chapterName:this.chapter&&this.chapter.innerText||"",isExternal:"_blank"===this.hyperlink.getAttribute("target")}}}]);var y=w;function w(t){var e;if(!(this instanceof w))throw new TypeError("Cannot call a class as a function");t&&(this.chapter=(e=p(e=t,"div > ul > li"),c("p",e)),this.hyperlink=m(t))}var b=function(){return'<div class="'+h+'"></div>'},k=function(t,e){a=e,r=t.route.path,o={},["previousText","nextText"].forEach(function(n){var i=a[n];"string"==typeof i?o[n]=i:Object.keys(i).some(function(t){var e=r&&-1<r.indexOf(t);return o[n]=e?i[t]:i,e})});var a,r,o,n=o,i=n.previousText,n=n.nextText;return[t.prev&&'\n <div class="pagination-item pagination-item--previous">\n <a href="'+t.prev.href+'" '+(t.prev.isExternal?'target="_blank"':"")+'>\n <div class="pagination-item-label">\n <svg width="10" height="16" viewBox="0 0 10 16" xmlns="http://www.w3.org/2000/svg">\n <polyline fill="none" vector-effect="non-scaling-stroke" points="8,2 2,8 8,14"/>\n </svg>\n <span>'+i+'</span>\n </div>\n <div class="pagination-item-title">'+t.prev.name+"</div>\n ",t.prev&&e.crossChapterText&&'<div class="paginaLine truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(e){("object"!=typeof exports||"undefined"==typeof module)&&"function"==typeof define&&define.amd?define(e):e()}(function(){"use strict";function e(e,n){var t,a=(n=void 0===n?{}:n).insertAt;e&&"undefined"!=typeof document&&(t=document.head||document.getElementsByTagName("head")[0],(n=document.createElement("style")).type="text/css","top"===a&&t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)))}var t;function a(e){e&&null!=t&&(e=e.getBoundingClientRect().top,document.querySelector(".sidebar").scrollBy(0,e-t))}function n(){requestAnimationFrame(function(){var e=document.querySelector(".app-sub-sidebar > .active");if(e)for(e.parentNode.parentNode.querySelectorAll(".app-sub-sidebar").forEach(function(e){return e.classList.remove("open")});e.parentNode.classList.contains("app-sub-sidebar")&&!e.parentNode.classList.contains("open");)e.parentNode.classList.add("open"),e=e.parentNode})}function o(e){t=e.target.getBoundingClientRect().top;var n=d(e.target,"LI",2);n&&(n.classList.contains("open")?(n.classList.remove("open"),setTimeout(function(){n.classList.add("collapse")},0)):(function(e){if(e)for(e.classList.remove("open","active");e&&"sidebar-nav"!==e.className&&e.parentNode;)"LI"!==e.parentNode.tagName&&"app-sub-sidebar"!==e.parentNode.className||e.parentNode.classList.remove("open"),e=e.parentNode}(s()),i(n),setTimeout(function(){n.classList.remove("collapse")},0)),a(n))}function s(){var e=document.querySelector(".sidebar-nav .active");return e||(e=d(document.querySelector('.sidebar-nav a[href="'.concat(decodeURIComponent(location.hash).replace(/ /gi,"%20"),'"]')),"LI",2))&&e.classList.add("active"),e}function i(e){if(e)for(e.classList.add("open","active");e&&"sidebar-nav"!==e.className&&e.parentNode;)"LI"!==e.parentNode.tagName&&"app-sub-sidebar"!==e.parentNode.className||e.parentNode.classList.add("open"),e=e.parentNode}function d(e,n,t){if(e&&e.tagName===n)return e;for(var a=0;e;){if(t<++a)return;if(e.parentNode.tagName===n)return e.parentNode;e=e.parentNode}}e(".sidebar-nav > ul > li ul {\n display: none;\n}\n\n.app-sub-sidebar {\n display: none;\n}\n\n.app-sub-sidebar.open {\n display: block;\n}\n\n.sidebar-nav .open > ul:not(.app-sub-sidebar),\n.sidebar-nav .active:not(.collapse) > ul {\n display: block;\n}\n\n/* 抖动 */\n.sidebar-nav li.open:not(.collapse) > ul {\n display: block;\n}\n\n.active + ul.app-sub-sidebar {\n display: block;\n}\n"),document.addEventListener("scroll",n);e("@media screen and (max-width: 768px) {\n /* 移动端适配 */\n .markdown-section {\n max-width: none;\n padding: 16px;\n }\n /* 改变原来按钮热区大小 */\n .sidebar-toggle {\n padding: 0 0 10px 10px;\n }\n /* my pin */\n .sidebar-pin {\n appearance: none;\n outline: none;\n position: fixed;\n bottom: 0;\n border: none;\n width: 40px;\n height: 40px;\n background: transparent;\n }\n}\n");var r,c="DOCSIFY_SIDEBAR_PIN_FLAG";function l(){var e="true"===(e=localStorage.getItem(c));localStorage.setItem(c,!e),e?(document.querySelector(".sidebar").style.transform="translateX(0)",document.querySelector(".content").style.transform="translateX(0)"):(document.querySelector(".sidebar").style.transform="translateX(300px)",document.querySelector(".content").style.transform="translateX(300px)")}768<document.documentElement.clientWidth||(localStorage.setItem(c,!1),(r=document.createElement("button")).classList.add("sidebar-pin"),r.onclick=l,document.body.append(r),window.addEventListener("load",function(){var n=document.querySelector(".content");document.body.onclick=n.onclick=function(e){e.target!==document.body&&e.currentTarget!==n||"true"===localStorage.getItem(c)&&l()}})),function(){if(window.$docsify){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];$docsify.plugins=n.concat($docsify.plugins||[])}else console.error("这是一个docsify插件,请先引用docsify库!")}(function(e,n){e.doneEach(function(e,n){var t=s();i(t),document.querySelectorAll(".sidebar-nav li").forEach(function(e){e.querySelector("ul:not(.app-sub-sidebar)")?e.classList.add("folder"):e.classList.add("file")}),function n(e,t){e&&e.childNodes&&e.childNodes.forEach(function(e){e.classList&&e.classList.contains("folder")&&(e.classList.add("level-".concat(t)),window.$docsify&&window.$docsify.sidebarDisplayLevel&&"number"==typeof window.$docsify.sidebarDisplayLevel&&t<=window.$docsify.sidebarDisplayLevel&&e.classList.add("open"),e&&1<e.childNodes.length&&n(e.childNodes[1],t+1))})}(document.querySelector(".sidebar-nav > ul"),1),a(t),n(e)}),e.ready(function(){document.querySelector(".sidebar-nav").addEventListener("click",o)})})});
|
||||
@@ -0,0 +1 @@
|
||||
!function(){function c(i){var o=Object.create(null);return function(e){var n=f(e)?e:JSON.stringify(e);return o[n]||(o[n]=i(e))}}var a=c(function(e){return e.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),u=Object.prototype.hasOwnProperty,m=Object.assign||function(e){for(var n=arguments,i=1;i<arguments.length;i++){var o,t=Object(n[i]);for(o in t)u.call(t,o)&&(e[o]=t[o])}return e};function f(e){return"string"==typeof e||"number"==typeof e}function d(){}function o(e){return"function"==typeof e}function g(e){e=e.match(/^([^:/?#]+:)?(?:\/{2,}([^/?#]*))?([^?#]+)?(\?[^#]*)?(#.*)?/);return"string"==typeof e[1]&&0<e[1].length&&e[1].toLowerCase()!==location.protocol||"string"==typeof e[2]&&0<e[2].length&&e[2].replace(new RegExp(":("+{"http:":80,"https:":443}[location.protocol]+")?$"),"")!==location.host}var s=document.body.clientWidth<=600,t=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/),i={};function l(e,n){if(void 0===n&&(n=!1),"string"==typeof e){if(void 0!==window.Vue)return b(e);e=n?b(e):i[e]||(i[e]=b(e))}return e}var v=document,h=v.body,_=v.head;function b(e,n){return n?e.querySelector(n):v.querySelector(e)}function k(e,n){return[].slice.call(n?e.querySelectorAll(n):v.querySelectorAll(e))}function w(e,n){return e=v.createElement(e),n&&(e.innerHTML=n),e}function r(e,n){return e.appendChild(n)}function y(e,n){return e.insertBefore(n,e.children[0])}function p(e,n,i){o(n)?window.addEventListener(e,n):e.addEventListener(n,i)}function x(e,n,i){o(n)?window.removeEventListener(e,n):e.removeEventListener(n,i)}function S(e,n,i){e&&e.classList[i?n:"toggle"](i||n)}function e(e,n){var i=(n=void 0===n?document:n).readyState;if("complete"===i||"interactive"===i)return setTimeout(e,0);n.addEventListener("DOMContentLoaded",e)}var n=Object.freeze({__proto__:null,getNode:l,$:v,body:h,head:_,find:b,findAll:k,create:w,appendTo:r,before:y,on:p,off:x,toggleClass:S,style:function(e){r(_,w("style",e))},documentReady:e});function A(e,n){return-1!==e.indexOf(n,e.length-n.length)}var $=decodeURIComponent,z=encodeURIComponent;function F(e){var n={};return(e=e.trim().replace(/^(\?|#|&)/,""))&&e.split("&").forEach(function(e){e=e.replace(/\+/g," ").split("=");n[e[0]]=e[1]&&$(e[1])}),n}function E(e,n){void 0===n&&(n=[]);var i,o=[];for(i in e)-1<n.indexOf(i)||o.push(e[i]?(z(i)+"="+z(e[i])).toLowerCase():z(i));return o.length?"?"+o.join("&"):""}var T=c(function(e){return/(:|(\/{2}))/g.test(e)}),C=c(function(e){return e.split(/[?#]/)[0]}),R=c(function(e){if(/\/$/g.test(e))return e;e=e.match(/(\S*\/)[^/]+$/);return e?e[1]:""}),j=c(function(e){return e.replace(/^\/+/,"/").replace(/([^:])\/{2,}/g,"$1/")}),O=c(function(e){for(var n=e.replace(/^\//,"").split("/"),i=[],o=0,t=n.length;o<t;o++){var a=n[o];".."===a?i.pop():"."!==a&&i.push(a)}return"/"+i.join("/")});function L(e){return e.split("/").filter(function(e){return-1===e.indexOf("#")}).join("/")}function q(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];return j(e.map(L).join("/"))}var P=c(function(e){return e.replace("#","?id=")}),M={};function I(e){this.config=e}function N(e){var n=location.href.indexOf("#");location.replace(location.href.slice(0,0<=n?n:0)+"#"+e)}I.prototype.getBasePath=function(){return this.config.basePath},I.prototype.getFile=function(e,n){void 0===e&&(e=this.getCurrentPath());var i,o,t=this.config,a=this.getBasePath(),r="string"==typeof t.ext?t.ext:".md";return e=t.alias?function e(n,i,o){var t=Object.keys(i).filter(function(e){return(M[e]||(M[e]=new RegExp("^"+e+"$"))).test(n)&&n!==o})[0];return t?e(n.replace(M[t],i[t]),i,n):n}(e,t.alias):e,i=e,o=r,e=(e=new RegExp("\\.("+o.replace(/^\./,"")+"|html)$","g").test(i)?i:/\/$/g.test(i)?i+"README"+o:""+i+o)==="/README"+r&&t.homepage||e,e=T(e)?e:q(a,e),e=n?e.replace(new RegExp("^"+a),""):e},I.prototype.onchange=function(e){(e=void 0===e?d:e)()},I.prototype.getCurrentPath=function(){},I.prototype.normalize=function(){},I.prototype.parse=function(){},I.prototype.toURL=function(e,n,i){var o=i&&"#"===e[0],t=this.parse(P(e));if(t.query=m({},t.query,n),e=(e=t.path+E(t.query)).replace(/\.md(\?)|\.md$/,"$1"),o&&(e=(0<(o=i.indexOf("?"))?i.substring(0,o):i)+e),this.config.relativePath&&0!==e.indexOf("/")){i=i.substring(0,i.lastIndexOf("/")+1);return j(O(i+e))}return j("/"+e)};var H=function(o){function e(e){o.call(this,e),this.mode="hash"}return o&&(e.__proto__=o),((e.prototype=Object.create(o&&o.prototype)).constructor=e).prototype.getBasePath=function(){var e=window.location.pathname||"",n=this.config.basePath,e=A(e,".html")?e+"#/"+n:e+"/"+n;return/^(\/|https?:)/g.test(n)?n:j(e)},e.prototype.getCurrentPath=function(){var e=location.href,n=e.indexOf("#");return-1===n?"":e.slice(n+1)},e.prototype.onchange=function(i){void 0===i&&(i=d);var o=!1;p("click",function(e){e="A"===e.target.tagName?e.target:e.target.parentNode;e&&"A"===e.tagName&&!/_blank/.test(e.target)&&(o=!0)}),p("hashchange",function(e){var n=oLine truncated
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Document</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="docsify" content="docsify">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
|
||||
<!--<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css">-->
|
||||
<link rel="stylesheet" href="./vue.css">
|
||||
<!-- <div id="app">加载中</div> -->
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: 'Messenger SDK 使用文档',
|
||||
repo: '',
|
||||
mergeNavbar: true,
|
||||
loadSidebar: 'list.md',
|
||||
loadNavbar: true,
|
||||
auto2top: true,
|
||||
topMargin: 90,
|
||||
subMaxLevel: 2,
|
||||
}
|
||||
</script>
|
||||
<!-- Docsify v4 -->
|
||||
<!--<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-lua.js"></script>-->
|
||||
<!--<script src="./docsify-sidebar-collapse.min.js"></script>-->
|
||||
<!--<link rel="stylesheet" href="./sidebar.min.css"/>-->
|
||||
<!-- 在 <script> 标签之前导入样式文件 -->
|
||||
<!-- 代码高亮 -->
|
||||
<!--<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-c.js"></script>
|
||||
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-cpp.js"></script>-->
|
||||
|
||||
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/prismjs/themes/prism.css">
|
||||
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.js"></script>
|
||||
<script src="./docsify-copy-code.js"></script>
|
||||
<script src="./docsify-pagination.min.js"></script>
|
||||
<script src="./search.min.js"></script>
|
||||
<script src="./docsify.js"></script>
|
||||
<script src="./prism-lua.js"></script>
|
||||
<script src="./prism-c.js"></script>
|
||||
<script src="./prism-cpp.js"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,4 @@
|
||||
* 文档
|
||||
* [首页](README.md)
|
||||
* [快速入门](doc/entry.md)
|
||||
* [异常处理](doc/error.md)
|
||||
+80
@@ -0,0 +1,80 @@
|
||||
Prism.languages.c = Prism.languages.extend('clike', {
|
||||
'comment': {
|
||||
pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,
|
||||
greedy: true
|
||||
},
|
||||
'string': {
|
||||
// https://en.cppreference.com/w/c/language/string_literal
|
||||
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
||||
greedy: true
|
||||
},
|
||||
'class-name': {
|
||||
pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,
|
||||
lookbehind: true
|
||||
},
|
||||
'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,
|
||||
'function': /\b[a-z_]\w*(?=\s*\()/i,
|
||||
'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,
|
||||
'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('c', 'string', {
|
||||
'char': {
|
||||
// https://en.cppreference.com/w/c/language/character_constant
|
||||
pattern: /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,
|
||||
greedy: true
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('c', 'string', {
|
||||
'macro': {
|
||||
// allow for multiline macro definitions
|
||||
// spaces after the # character compile fine with gcc
|
||||
pattern: /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,
|
||||
lookbehind: true,
|
||||
greedy: true,
|
||||
alias: 'property',
|
||||
inside: {
|
||||
'string': [
|
||||
{
|
||||
// highlight the path of the include statement as a string
|
||||
pattern: /^(#\s*include\s*)<[^>]+>/,
|
||||
lookbehind: true
|
||||
},
|
||||
Prism.languages.c['string']
|
||||
],
|
||||
'char': Prism.languages.c['char'],
|
||||
'comment': Prism.languages.c['comment'],
|
||||
'macro-name': [
|
||||
{
|
||||
pattern: /(^#\s*define\s+)\w+\b(?!\()/i,
|
||||
lookbehind: true
|
||||
},
|
||||
{
|
||||
pattern: /(^#\s*define\s+)\w+\b(?=\()/i,
|
||||
lookbehind: true,
|
||||
alias: 'function'
|
||||
}
|
||||
],
|
||||
// highlight macro directives as keywords
|
||||
'directive': {
|
||||
pattern: /^(#\s*)[a-z]+/,
|
||||
lookbehind: true,
|
||||
alias: 'keyword'
|
||||
},
|
||||
'directive-hash': /^#/,
|
||||
'punctuation': /##|\\(?=[\r\n])/,
|
||||
'expression': {
|
||||
pattern: /\S[\s\S]*/,
|
||||
inside: Prism.languages.c
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('c', 'function', {
|
||||
// highlight predefined macros as constants
|
||||
'constant': /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
||||
});
|
||||
|
||||
delete Prism.languages.c['boolean'];
|
||||
@@ -0,0 +1,99 @@
|
||||
(function (Prism) {
|
||||
|
||||
var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;
|
||||
var modName = /\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g, function () { return keyword.source; });
|
||||
|
||||
Prism.languages.cpp = Prism.languages.extend('c', {
|
||||
'class-name': [
|
||||
{
|
||||
pattern: RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source
|
||||
.replace(/<keyword>/g, function () { return keyword.source; })),
|
||||
lookbehind: true
|
||||
},
|
||||
// This is intended to capture the class name of method implementations like:
|
||||
// void foo::bar() const {}
|
||||
// However! The `foo` in the above example could also be a namespace, so we only capture the class name if
|
||||
// it starts with an uppercase letter. This approximation should give decent results.
|
||||
/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,
|
||||
// This will capture the class name before destructors like:
|
||||
// Foo::~Foo() {}
|
||||
/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,
|
||||
// This also intends to capture the class name of method implementations but here the class has template
|
||||
// parameters, so it can't be a namespace (until C++ adds generic namespaces).
|
||||
/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/
|
||||
],
|
||||
'keyword': keyword,
|
||||
'number': {
|
||||
pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,
|
||||
greedy: true
|
||||
},
|
||||
'operator': />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,
|
||||
'boolean': /\b(?:false|true)\b/
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('cpp', 'string', {
|
||||
'module': {
|
||||
// https://en.cppreference.com/w/cpp/language/modules
|
||||
pattern: RegExp(
|
||||
/(\b(?:import|module)\s+)/.source +
|
||||
'(?:' +
|
||||
// header-name
|
||||
/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source +
|
||||
'|' +
|
||||
// module name or partition or both
|
||||
/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g, function () { return modName; }) +
|
||||
')'
|
||||
),
|
||||
lookbehind: true,
|
||||
greedy: true,
|
||||
inside: {
|
||||
'string': /^[<"][\s\S]+/,
|
||||
'operator': /:/,
|
||||
'punctuation': /\./
|
||||
}
|
||||
},
|
||||
'raw-string': {
|
||||
pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,
|
||||
alias: 'string',
|
||||
greedy: true
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('cpp', 'keyword', {
|
||||
'generic-function': {
|
||||
pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,
|
||||
inside: {
|
||||
'function': /^\w+/,
|
||||
'generic': {
|
||||
pattern: /<[\s\S]+/,
|
||||
alias: 'class-name',
|
||||
inside: Prism.languages.cpp
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('cpp', 'operator', {
|
||||
'double-colon': {
|
||||
pattern: /::/,
|
||||
alias: 'punctuation'
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('cpp', 'class-name', {
|
||||
// the base clause is an optional list of parent classes
|
||||
// https://en.cppreference.com/w/cpp/language/class
|
||||
'base-clause': {
|
||||
pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,
|
||||
lookbehind: true,
|
||||
greedy: true,
|
||||
inside: Prism.languages.extend('cpp', {})
|
||||
}
|
||||
});
|
||||
|
||||
Prism.languages.insertBefore('inside', 'double-colon', {
|
||||
// All untokenized words that are not namespaces should be class names
|
||||
'class-name': /\b[a-z_]\w*\b(?!\s*::)/i
|
||||
}, Prism.languages.cpp['base-clause']);
|
||||
|
||||
}(Prism));
|
||||
@@ -0,0 +1,20 @@
|
||||
Prism.languages.lua = {
|
||||
'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,
|
||||
// \z may be used to skip the following space
|
||||
'string': {
|
||||
pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,
|
||||
greedy: true
|
||||
},
|
||||
'number': /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,
|
||||
'keyword': /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,
|
||||
'function': /(?!\d)\w+(?=\s*(?:[({]))/,
|
||||
'operator': [
|
||||
/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,
|
||||
{
|
||||
// Match ".." but don't break "..."
|
||||
pattern: /(^|[^.])\.\.(?!\.)/,
|
||||
lookbehind: true
|
||||
}
|
||||
],
|
||||
'punctuation': /[\[\](){},;]|\.+|:+/
|
||||
};
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(){function u(e){return e.replace(/<!-- {docsify-ignore} -->/,"").replace(/{docsify-ignore}/,"").replace(/<!-- {docsify-ignore-all} -->/,"").replace(/{docsify-ignore-all}/,"").trim()}var f={},m={EXPIRE_KEY:"docsify.search.expires",INDEX_KEY:"docsify.search.index"};function g(e){var n={"&":"&","<":"<",">":">",'"':""","'":"'"};return String(e).replace(/[&<>"']/g,function(e){return n[e]})}function y(e){return e.text||"table"!==e.type||(e.cells.unshift(e.header),e.text=e.cells.map(function(e){return e.join(" | ")}).join(" |\n ")),e.text}function v(e){return e.text||"list"!==e.type||(e.text=e.raw),e.text}function b(o,e,s,c){void 0===e&&(e="");var d,e=window.marked.lexer(e),l=window.Docsify.slugify,p={},h="";return e.forEach(function(e,n){var t,a,i,r;"heading"===e.type&&e.depth<=c?(t=(a=(i=e.text,r={},{str:i=(i=void 0===i?"":i)&&i.replace(/^('|")/,"").replace(/('|")$/,"").replace(/(?:^|\s):([\w-]+:?)=?([\w-%]+)?/g,function(e,n,t){return-1===n.indexOf(":")?(r[n]=t&&t.replace(/"/g,"")||!0,""):e}).trim(),config:r})).str,i=a.config,a=u(e.text),d=i.id?s.toURL(o,{id:l(i.id)}):s.toURL(o,{id:l(g(a))}),t&&(h=u(t)),p[d]={slug:d,title:h,body:""}):(0===n&&(d=s.toURL(o),p[d]={slug:d,title:"/"!==o?o.slice(1):"Home Page",body:e.text||""}),d&&(p[d]?p[d].body?(e.text=y(e),e.text=v(e),p[d].body+="\n"+(e.text||"")):(e.text=y(e),e.text=v(e),p[d].body=p[d].body?p[d].body+e.text:e.text):p[d]={slug:d,title:"",body:""}))}),l.clear(),p}function p(e){return e&&e.normalize?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function o(e){var n=[],t=[];Object.keys(f).forEach(function(n){t=t.concat(Object.keys(f[n]).map(function(e){return f[n][e]}))});var a=(e=e.trim()).split(/[\s\-,\\/]+/);1!==a.length&&(a=[].concat(e,a));for(var i=0;i<t.length;i++)!function(e){var e=t[e],r=0,o="",s="",c="",d=e.title&&e.title.trim(),l=e.body&&e.body.trim(),e=e.slug||"";d&&(a.forEach(function(e){var n,t,a=new RegExp(g(p(e)).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&"),"gi"),i=-1;s=d&&g(p(d)),c=l&&g(p(l)),t=d?s.search(a):-1,i=l?c.search(a):-1,(0<=t||0<=i)&&(r+=0<=t?3:0<=i?2:0,t=(t=n=0)==(n=(i=i<0?0:i)<11?0:i-10)?70:i+e.length+60,l&&t>l.length&&(t=l.length),a=c&&"..."+c.substring(n,t).replace(a,function(e){return'<em class="search-keyword">'+e+"</em>"})+"...",o+=a)}),0<r&&(e={title:s,content:l?o:"",url:e,score:r},n.push(e)))}(i);return n.sort(function(e,n){return n.score-e.score})}function r(a,i){var t,r,n,e,o="auto"===a.paths,s=o?(t=i.router,r=[],Docsify.dom.findAll(".sidebar-nav a:not(.section-link):not([data-nosearch])").forEach(function(e){var n=e.href,e=e.getAttribute("href"),n=t.parse(n).path;n&&-1===r.indexOf(n)&&!Docsify.util.isAbsolutePath(e)&&r.push(n)}),r):a.paths,c="";s.length&&o&&a.pathNamespaces?(n=s[0],Array.isArray(a.pathNamespaces)?c=a.pathNamespaces.filter(function(e){return n.slice(0,e.length)===e})[0]||c:a.pathNamespaces instanceof RegExp&&((d=n.match(a.pathNamespaces))&&(c=d[0])),e=-1===s.indexOf(c+"/"),d=-1===s.indexOf(c+"/README"),e&&d&&s.unshift(c+"/")):-1===s.indexOf("/")&&-1===s.indexOf("/README")&&s.unshift("/");var d,l=((d=a.namespace)?m.EXPIRE_KEY+"/"+d:m.EXPIRE_KEY)+c,p=((d=a.namespace)?m.INDEX_KEY+"/"+d:m.INDEX_KEY)+c,c=localStorage.getItem(l)<Date.now();if(f=JSON.parse(localStorage.getItem(p)),c)f={};else if(!o)return;var h=s.length,u=0;s.forEach(function(t){return f[t]?u++:void Docsify.get(i.router.getFile(t),!1,i.config.requestHeaders).then(function(e){var n;f[t]=b(t,e,i.router,a.depth),h===++u&&(n=a.maxAge,e=p,localStorage.setItem(l,Date.now()+n),localStorage.setItem(e,JSON.stringify(f)))})})}var s,c="";function d(e){var n=Docsify.dom.find("div.search"),t=Docsify.dom.find(n,".results-panel"),a=Docsify.dom.find(n,".clear-button"),i=Docsify.dom.find(".sidebar-nav"),n=Docsify.dom.find(".app-name");if(!e)return t.classList.remove("show"),a.classList.remove("show"),t.innerHTML="",void(s.hideOtherSidebarContent&&(i&&i.classList.remove("hide"),n&&n.classList.remove("hide")));var e=o(e),r="";e.forEach(function(e){r+='<div class="matching-post">\n<a href="'+e.url+'">\n<h2>'+e.title+"</h2>\n<p>"+e.content+"</p>\n</a>\n</div>"}),t.classList.add("show"),a.classList.add("show"),t.innerHTML=r||'<p class="empty">'+c+"</p>",s.hideOtherSidebarContent&&(i&&i.classList.add("hide"),n&&n.classList.add("hide"))}function l(e){s=e}function h(e,n){var t,a,i=n.router.parse().query.s;l(e),Docsify.dom.style("\n.sidebar {\n padding-top: 0;\n}\n\n.search {\n margin-bottom: 20px;\n padding: 6px;\n border-bottom: 1px solid #eee;\n}\n\n.search .input-wrap {\n display: flex;\n align-items: center;\n}\n\n.search .results-panel {\n display: none;\n}\n\n.search .results-panel.show {\n display: block;\n}\n\n.search input {\n outline: none;\n border: none;\n width: 100%;\n padding: 0.6em 7px;\n font-size: inherit;\n border: 1px solid transparent;\n}\n\n.search input:focus {\n box-shadow: 0 0 5px var(--theme-color, #42b983);\n border: 1px solid var(--theme-color, #42b983);\n}\n\n.search input::-webkit-search-decoration,\Line truncated
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
.sidebar-nav li{position:relative;margin:0;cursor:pointer}.sidebar-nav ul:not(.app-sub-sidebar)>li:not(.file)::before{content:'';display:block;position:absolute;top:11px;left:-12px;height:6px;width:6px;border-right:1px solid #505d6b;border-bottom:1px solid #505d6b;transform:rotate(-45deg);transition:transform .1s}.sidebar-nav ul:not(.app-sub-sidebar)>li.open::before{transform:rotate(45deg)}.sidebar-nav ul:not(.app-sub-sidebar)>li.collapse::before{transform:rotate(-45deg)}
|
||||
@@ -0,0 +1 @@
|
||||
@import url("https://fonts.googleapis.com/css?family=Roboto+Mono|Source+Sans+Pro:300,400,600");*{-webkit-font-smoothing:antialiased;-webkit-overflow-scrolling:touch;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-text-size-adjust:none;-webkit-touch-callout:none;box-sizing:border-box}body:not(.ready){overflow:hidden}body:not(.ready) .app-nav,body:not(.ready)>nav,body:not(.ready) [data-cloak]{display:none}div#app{font-size:30px;font-weight:lighter;margin:40vh auto;text-align:center}div#app:empty:before{content:"Loading..."}img.emoji{height:1.2em}img.emoji,span.emoji{vertical-align:middle}span.emoji{font-family:Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1.2em}.progress{background-color:#42b983;background-color:var(--theme-color,#42b983);height:2px;left:0;position:fixed;right:0;top:0;transition:width .2s,opacity .4s;width:0;z-index:999999}.search .search-keyword,.search a:hover{color:#42b983;color:var(--theme-color,#42b983)}.search .search-keyword{font-style:normal;font-weight:700}body,html{height:100%}body{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:#34495e;font-family:Source Sans Pro,Helvetica Neue,Arial,sans-serif;font-size:15px;letter-spacing:0;margin:0;overflow-x:hidden}img{max-width:100%}a[disabled]{cursor:not-allowed;opacity:.6}kbd{border:1px solid #ccc;border-radius:3px;display:inline-block;font-size:12px!important;line-height:12px;margin-bottom:3px;padding:3px 5px;vertical-align:middle}li input[type=checkbox]{margin:0 .2em .25em 0;vertical-align:middle}.app-nav{margin:25px 60px 0 0;position:absolute;right:0;text-align:right;z-index:10}.app-nav.no-badge{margin-right:25px}.app-nav p{margin:0}.app-nav>a{margin:0 1rem;padding:5px 0}.app-nav li,.app-nav ul{display:inline-block;list-style:none;margin:0}.app-nav a{color:inherit;font-size:16px;text-decoration:none;transition:color .3s}.app-nav a.active,.app-nav a:hover{color:#42b983;color:var(--theme-color,#42b983)}.app-nav a.active{border-bottom:2px solid #42b983;border-bottom:2px solid var(--theme-color,#42b983)}.app-nav li{display:inline-block;margin:0 1rem;padding:5px 0;position:relative;cursor:pointer}.app-nav li ul{background-color:#fff;border:1px solid;border-color:#ddd #ddd #ccc;border-radius:4px;box-sizing:border-box;display:none;max-height:calc(100vh - 61px);overflow-y:auto;padding:10px 0;position:absolute;right:-15px;text-align:left;top:100%;white-space:nowrap}.app-nav li ul li{display:block;font-size:14px;line-height:1rem;margin:8px 14px;white-space:nowrap}.app-nav li ul a{display:block;font-size:inherit;margin:0;padding:0}.app-nav li ul a.active{border-bottom:0}.app-nav li:hover ul{display:block}.github-corner{border-bottom:0;position:fixed;right:0;text-decoration:none;top:0;z-index:1}.github-corner:hover .octo-arm{animation:octocat-wave .56s ease-in-out}.github-corner svg{color:#fff;fill:#42b983;fill:var(--theme-color,#42b983);height:80px;width:80px}main{display:block;position:relative;width:100vw;height:100%;z-index:0}main.hidden{display:none}.anchor{display:inline-block;text-decoration:none;transition:all .3s}.anchor span{color:#34495e}.anchor:hover{text-decoration:underline}.sidebar{border-right:1px solid rgba(0,0,0,.07);overflow-y:auto;padding:40px 0 0;position:absolute;top:0;bottom:0;left:0;transition:transform .25s ease-out;width:300px;z-index:20}.sidebar>h1{margin:0 auto 1rem;font-size:1.5rem;font-weight:300;text-align:center}.sidebar>h1 a{color:inherit;text-decoration:none}.sidebar>h1 .app-nav{display:block;position:static}.sidebar .sidebar-nav{line-height:2em;padding-bottom:40px}.sidebar li.collapse .app-sub-sidebar{display:none}.sidebar ul{margin:0 0 0 15px;padding:0}.sidebar li>p{font-weight:700;margin:0}.sidebar ul,.sidebar ul li{list-style:none}.sidebar ul li a{border-bottom:none;display:block}.sidebar ul li ul{padding-left:20px}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:transparent;border-radius:4px}.sidebar:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,53.3%,.4)}.sidebar:hover::-webkit-scrollbar-track{background:hsla(0,0%,53.3%,.1)}.sidebar-toggle{background-color:transparent;background-color:hsla(0,0%,100%,.8);border:0;outline:none;padding:10px;position:absolute;bottom:0;left:0;text-align:center;transition:opacity .3s;width:284px;z-index:30;cursor:pointer}.sidebar-toggle:hover .sidebar-toggle-button{opacity:.4}.sidebar-toggle span{background-color:#42b983;background-color:var(--theme-color,#42b983);display:block;margin-bottom:4px;width:16px;height:2px}body.sticky .sidebar,body.sticky .sidebar-toggle{position:fixed}.content{padding-top:60px;position:absolute;top:0;right:0;bottom:0;left:300px;transition:left .25s ease}.markdown-section{margin:0 auto;max-width:80%;padding:30px 15px 40px;position:relative}.markdown-section>*{box-sizing:border-box;font-size:inherit}.markdown-section>:first-child{margin-top:0!important}.markdown-section hr{border:none;border-bottom:1px solid #eee;margin:2em 0}.markdown-section iframe{border:1Line truncated
|
||||
Reference in new issue
Block a user