Commit d4c7e4f4 authored by greg@1m's avatar greg@1m
Browse files

updating doc for 0.30 release

parent f2b14a7b
......@@ -200,11 +200,11 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">note.render</span>
- Type: <span class="render-code-wrapper">Function</span>
- Parameters:
1. p: <span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;raw: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;windowId: <span class="render-code-wrapper">string</span><br/>}</span>
1. p: <span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"><a href="#client-api?id=ifile">iFile</a></span>, <br/>&nbsp;&nbsp;&nbsp;raw: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;windowId: <span class="render-code-wrapper">string</span><br/>}</span>
- Result: <span class="render-code-wrapper">string</span>
- Example:
<div class="render-code-wrapper">api.call(<br/>&nbsp;&nbsp;&nbsp;"note.render",<br/>&nbsp;&nbsp;&nbsp; [<span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;raw: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;windowId: <span class="render-code-wrapper">string</span><br/>}</span> ], <br/>(res:<span class="render-code-wrapper">string</span>) => {}<br/>)</div>
<div class="render-code-wrapper">api.call(<br/>&nbsp;&nbsp;&nbsp;"note.render",<br/>&nbsp;&nbsp;&nbsp; [<span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"><a href="#client-api?id=ifile">iFile</a></span>, <br/>&nbsp;&nbsp;&nbsp;raw: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;windowId: <span class="render-code-wrapper">string</span><br/>}</span> ], <br/>(res:<span class="render-code-wrapper">string</span>) => {}<br/>)</div>
......@@ -465,9 +465,9 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">upload.uploadFile</span>
- Type: <span class="render-code-wrapper">Function</span>
- Parameters:
1. p: <span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"></span>, <br/>&nbsp;&nbsp;&nbsp;folderPath: <span class="render-code-wrapper">string</span><br/>}</span>
1. p: <span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"></span>, <br/>&nbsp;&nbsp;&nbsp;folderPath: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;onProgress: <span class="render-code-wrapper"><a href="#client-api?id=onuploadprogressfn">onUploadProgressFn</a></span>, <br/>&nbsp;&nbsp;&nbsp;onSuccess: <span class="render-code-wrapper"><a href="#client-api?id=onuploadsuccessfn">onUploadSuccessFn</a></span><br/>}</span>
- Example:
<div class="render-code-wrapper">api.call(<br/>&nbsp;&nbsp;&nbsp;"upload.uploadFile",<br/>&nbsp;&nbsp;&nbsp; [<span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"></span>, <br/>&nbsp;&nbsp;&nbsp;folderPath: <span class="render-code-wrapper">string</span><br/>}</span> ]<br/>)</div>
<div class="render-code-wrapper">api.call(<br/>&nbsp;&nbsp;&nbsp;"upload.uploadFile",<br/>&nbsp;&nbsp;&nbsp; [<span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"></span>, <br/>&nbsp;&nbsp;&nbsp;folderPath: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;onProgress: <span class="render-code-wrapper"><a href="#client-api?id=onuploadprogressfn">onUploadProgressFn</a></span>, <br/>&nbsp;&nbsp;&nbsp;onSuccess: <span class="render-code-wrapper"><a href="#client-api?id=onuploadsuccessfn">onUploadSuccessFn</a></span><br/>}</span> ]<br/>)</div>
......@@ -520,7 +520,7 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">iFile</span>
- Type: <span class="render-code-wrapper">object</span>
- Details:
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;folder: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;name: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;path: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;realname: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;created?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;extension?: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;index?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;modified?: <span class="render-code-wrapper">number</span><br/>}</span></div>
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;folder: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;name: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;nature: <span class="render-code-wrapper"><a href="#client-api?id=ifilenature">iFileNature</a></span>, <br/>&nbsp;&nbsp;&nbsp;path: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;realname: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;created?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;extension?: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;index?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;modified?: <span class="render-code-wrapper">number</span><br/>}</span></div>
#### <span class="render-code-wrapper">iGetFilesCb</span>
......@@ -546,7 +546,7 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">iSearchWordRes</span>
- Type: <span class="render-code-wrapper">object</span>
- Details:
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>}</span></div>
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;[filePath:string]: <span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"><a href="#client-api?id=ifile">iFile</a></span>, <br/>&nbsp;&nbsp;&nbsp;results: <span class="render-code-wrapper">string[]</span><br/>}</span><br/>}</span></div>
#### <span class="render-code-wrapper">iViewType</span>
......@@ -558,7 +558,7 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">iWindowContent</span>
- Type: <span class="render-code-wrapper">object</span>
- Details:
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;active: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;i: <span class="render-code-wrapper">string</span><br/>}</span></div>
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;active: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;file: <span class="render-code-wrapper"><a href="#client-api?id=ifile">iFile</a></span>, <br/>&nbsp;&nbsp;&nbsp;i: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;view: <span class="render-code-wrapper"><a href="#client-api?id=iviewtype">iViewType</a></span><br/>}</span></div>
#### <span class="render-code-wrapper">iWindow</span>
......@@ -576,7 +576,7 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">iTab</span>
- Type: <span class="render-code-wrapper">object</span>
- Details:
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;active: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;id: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;name: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;manualName?: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;position?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;refresh?: <span class="render-code-wrapper">number</span><br/>}</span></div>
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;active: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;grid: <span class="render-code-wrapper"><a href="#client-api?id=igrid">iGrid</a></span>, <br/>&nbsp;&nbsp;&nbsp;id: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;name: <span class="render-code-wrapper">string</span>, <br/>&nbsp;&nbsp;&nbsp;manualName?: <span class="render-code-wrapper">boolean</span>, <br/>&nbsp;&nbsp;&nbsp;position?: <span class="render-code-wrapper">number</span>, <br/>&nbsp;&nbsp;&nbsp;refresh?: <span class="render-code-wrapper">number</span><br/>}</span></div>
#### <span class="render-code-wrapper">onUploadProgressFn</span>
......@@ -604,7 +604,7 @@ noteLink should be relative from tiro folder
#### <span class="render-code-wrapper">keyVal</span>
- Type: <span class="render-code-wrapper">object</span>
- Details:
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;val: <span class="render-code-wrapper">any</span><br/>}</span></div>
<div class="render-code-wrapper"><span class="render-code-wrapper">{<br/>&nbsp;&nbsp;&nbsp;key: <span class="render-code-wrapper"><a href="#client-api?id=iusersettingname">iUserSettingName</a></span>, <br/>&nbsp;&nbsp;&nbsp;val: <span class="render-code-wrapper">any</span><br/>}</span></div>
<style>
h4 .render-code-wrapper {
......
......@@ -2,10 +2,17 @@
Mac/Linux/Windows Applications can be downloaded [here](https://github.com/dotgreg/tiro-notes/releases/tag/production)
Mac | Windows | Linux
-|-|-
[tiro.app](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/Tiro.Notes-0.27.4.app.zip)| [tiro.exe](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/Tiro.Notes-0.27.4.exe.zip)| [tiro.deb](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/tiro-notes_0.27.4_amd64.deb.zip)
Version | Mac | Windows | Linux | Changelog
-|-|-|-|-
0.30.3| [tiro.app](https://github.com/dotgreg/tiro-notes/releases/download/0.30.3/tiro-notes-darwin-x64.zip)| [tiro.exe](https://github.com/dotgreg/tiro-notes/releases/download/0.30.3/tiro-notes-win-x64.zip)| [tiro.deb](https://github.com/dotgreg/tiro-notes/releases/download/0.30.3/tiro-notes-linux-x64.zip) | [Changelog](https://github.com/dotgreg/tiro-notes/releases/tag/0.30.3)
<details>
<summary>Previous versions</summary>
Version | Mac | Windows | Linux | Changelog
-|-|-|-|-
0.27.4| [tiro.app](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/Tiro.Notes-0.27.4.app.zip)| [tiro.exe](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/Tiro.Notes-0.27.4.exe.zip)| [tiro.deb](https://github.com/dotgreg/tiro-notes/releases/download/0.27.4/tiro-notes_0.27.4_amd64.deb.zip) | [Changelog](https://github.com/dotgreg/tiro-notes/releases/tag/0.27.4)
</details>
### COMMAND LINE (Required for Android & Ios) <!-- {docsify-ignore} -->
- Requirements : [NodeJs](https://nodejs.org/en/download/) and [RipGrep](https://github.com/BurntSushi/ripgrep)
......
......@@ -65,14 +65,15 @@ const exportDocumentationFromJson = (
buildExtObjs(data)
console.log("==> ANALYSING ROOT INTERFACE ");
console.log(p.objectToAnalyze);
// MAIN ANALYZER
const analyzedArr = getAnalyzedStructure(data, p.objectToAnalyze, p.blacklist)
// FROM FLAT ARR TO LAYERED FOR TITLE N STUFFS
const structArrs = flatToStructured(analyzedArr, 1)
if (p.debug) console.log(191, d(structArrs));
// if (p.debug) console.log(192, d(structArrs));
// if (p.debug) console.log(193, d(structArrs));
// RENDER LOGIC
......@@ -110,7 +111,6 @@ const strIframeApi = exportDocumentationFromJson({
funcStart: (o2, { j }) => `api.${o2.path}(`,
funcDisplay: "normal"
},
debug: true
})
// console.log(strIframeApi);
......@@ -141,7 +141,8 @@ const strClientApi = exportDocumentationFromJson({
titlePre: "Api.call : ",
funcStart: (o2, { j }) => `api.call(${j(3)}"${o2.path}",${j(3)} [`,
funcDisplay: "api.call"
}
},
debug: true
})
// updateDocFile(strClientApi)
......
......@@ -102,12 +102,40 @@ export const analyzeItem = (item: any, path?: string, options?: { raw?: boolean
}
//
// OBJ DIC {}
// like : { [filePath: string]: { file: iFile, results: string[] } }
//
} else if (
(
p.type && p.type.type === "reflection" ||
p.kindString === "Interface") &&
p.type && p.type.declaration && p.type.declaration.indexSignature && p.type.declaration.indexSignature.parameters
) {
// [filePath: string] should be like a normal obj prop
const b = p.type.declaration.indexSignature
const params = b.parameters
const propName = `[${params[0].name}:${params[0].type.name}]`
res.objprop = {}
res.type = "object"
// get subobj
const subObj = b.type && b.type.declaration && b.type.declaration || {}
console.log(d(subObj));
res.objprop[`${propName}`] = analyzeItem(subObj, '', { raw: false })
res.objprop[`${propName}`].name = propName
// if (p.name === "iSearchWordRes") console.log(192, d(res));
console.log(192, d(res));
//
// OBJ
//
} else if (
p.type && p.type.type === "reflection" ||
p.kindString === "Interface"
p.kindString === "Interface" ||
p.kindString === "Type literal"
) {
const getObjProps = (res: iAnalyzedObj, children: any[]) => {
......@@ -116,6 +144,7 @@ export const analyzeItem = (item: any, path?: string, options?: { raw?: boolean
const optional = {}
each(children, p2 => {
const o2 = analyzeItem(p2, '', { raw: false })
if (o2 && o2.name) {
if (o2.optional) optional[o2.name] = o2
else required[o2.name] = o2
......@@ -131,10 +160,15 @@ export const analyzeItem = (item: any, path?: string, options?: { raw?: boolean
getObjProps(res, p.type.declaration.children)
}
if (p.kindString === "Interface" && p.children) {
if ((
p.kindString === "Interface" ||
p.kindString === "Type literal"
) && p.children) {
getObjProps(res, p.children)
}
// console.log(193, d(res));
} else if (p.type && p.type.type) {
//
......@@ -171,12 +205,12 @@ export const analyzeItem = (item: any, path?: string, options?: { raw?: boolean
//
// REFERENCES TO EXT INTERVAL
//
else if (p.type.type === 'reference') {
else if (
p.type.type === 'reference'
) {
addToExtRefs(getReferenceByName(p.type.name))
// const r1 = getReferenceByName(p.type.name)
// if (r1) res = r1
// res.name = p.name
res = { name: '', type: "reference", externalRefName: p.type.name }
const name = p.name || ''
res = { name, type: "reference", externalRefName: p.type.name }
}
//
// UNION
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment