From: Tan Kian-ting Date: Sat, 25 Nov 2023 14:50:23 +0000 (+0800) Subject: update readme X-Git-Url: https://git.kianting.info/?a=commitdiff_plain;h=714bbb4a64531268d17ca8f7ae60800ec2046a27;p=clo update readme --- diff --git a/.vscode/launch.json b/.vscode/launch.json index 2fe5aee..a6a1fc9 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -16,6 +16,16 @@ "${workspaceFolder}/**/*.js" ] }, + + { + "type": "node-terminal", + "name": "Debug Current TS File (ts-node)", + "request": "launch", + "command": "source ${workspaceFolder}/activate.sh ; ts-node -- ${fileBasenameNoExtension}", + "cwd": "${fileDirname}" + }, + + { "type": "node", "request": "launch", diff --git a/README.md b/README.md index cfa3a06..df3f525 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ - another personal draught of a typesetting language and engine. - website: https://kianting.info/wiki/w/Project:Clo - license: MIT + - docs : https://buhong.kianting.info/docs/clo/index.html - issue tracking mailing list: `clo@kianting.info` ## How to use @@ -44,7 +45,8 @@ - 20231109-10: Keng-kái oa̍h-chōa ián-sǹg-hoat. - 20231113: the algorithm is basically fixed, and make a `bigFrame` to prepare for convert to boxes and positions. - 20231115-16: grid and basic types laying. - - 231120 fix the line-breaking algorithm + - 20231120: fix the line-breaking algorithm + - 20231125: multiple paragraph basic ## 之後的做法 - 先做一個前處理註冊器,註冊下列的前處理 @@ -64,7 +66,7 @@ (hglue 寬度 伸展值) (vglue 高度 伸展值) (bp 原始模式 斷行模式) ; breakpoint - (nl) ; newline + (br) ; force newline (em 數字) (ex 數字) (span {"font-family" : "Noto Sans" , "font-size" : 16 }) @@ -75,5 +77,8 @@ - `typedoc /path/to/src1 [/path/to/another/src/or/.js ...]` the generated page will be stored in `/docs`. + - set the referee source to my repo: + - `typedoc --sourceLinkTemplate "https://git.kianting.info/?p=clo;a=blob;f={path};hb=HEAD#l{line}" /path/to/src1 ...` + store the documents - `rsync /path/to/docs host@/var/www/docs` \ No newline at end of file diff --git a/b.js b/b.js index 8e28a83..ac8e773 100644 --- a/b.js +++ b/b.js @@ -9,9 +9,11 @@ let clo = new cloLib.Clo(); /* CLO: beginning of middle part*/ clo.mainStream = /* CLO: end of middle part*/ -[`In`, ` `, `the`, ` `, `beginning`, ` `, `was`, ` `, `the`, ` `, `Word,`, ` `, `and`, ` `, `the`, ` `, `Word`, ` `, `was`, ` `, `with`, ` `, `God,`, ` `, `and`, ` `, `the`, ` `, `Word`, ` `, `was`, ` `, `God.`, ` `, `The`, ` `, `same`, ` `, `was`, ` - `, `in`, ` `, `the`, ` `, `beginning`, ` `, `with`, ` `, `God.`, ` `, `All`, ` `, `things`, ` `, `were`, ` `, `made`, ` `, `by`, ` `, `him`, `;`, ` `, `and`, ` `, `without`, ` `, `him`, ` `, `was`, ` `, `not`, ` `, `any`, ` `, `thing`, ` `, `made`, ` `, `that`, ` - `, `was`, ` `, `made.`, ` `, `In`, ` `, `him`, ` `, `was`, ` `, `life`, `;`, ` `, `and`, ` `, `the`, ` `, `life`, ` `, `was`, ` `, `the`, ` `, `light`, ` `, `of`, ` `, `men.`, ` `, `And`, ` `, `the`, ` `, `light`, ` `, `shineth`, ` `, `in`, ` `, `darkness`, `;`, ` `, `and`, ` `, `the`, ` `, `darkness`, ` `, `comprehended`, ` `, `it`, ` `, `not.`, ["hglue", "10000"], " "]; +[`Files`, ` `, `in`, ` `, `the`, ` `, `folder`, ` `, `"%B"`, ` `, `cannot`, ` `, `be`, ` `, `deleted`, ` `, `because`, ` `, `you`, ` `, `do`, ` `, `not`, ` `, `have`, ` `, `permissions`, ` `, `to`, ` `, `see`, ` `, `them.`, ` + +`, `"Goloshes!"`, ` `, `said`, ` `, `Mrs`, ` `, `Conroy.`, ` `, `"That\'s`, ` `, `the`, ` `, `latest.`, ` `, `Whenever`, ` `, `it\'s`, ` `, `wet`, ` `, `underfoot`, ` `, `I`, ` `, `must`, ` `, `put`, ` `, `on`, ` `, `my`, ` `, `goloshes.`, ` `, `Tonight`, ` `, `even`, ` `, `he`, ` `, `wanted`, ` `, `me`, ` `, `to`, ` `, `put`, ` `, `them`, ` `, `on,`, ` `, `but`, ` `, `I`, ` `, `wouldn\'t.`, ` `, `The`, ` `, `next`, ` `, `thing`, ` `, `he\'ll`, ` `, `buy`, ` `, `me`, ` `, `will`, ` `, `be`, ` `, `a`, ` `, `diving`, ` `, `suit."`, ` + + `, `When`, ` `, `the`, ` `, `short`, ` `, `days`, ` `, `of`, ` `, `winter`, ` `, `came`, ` `, `dusk`, ` `, `fell`, ` `, `before`, ` `, `we`, ` `, `had`, ` `, `well`, ` `, `eaten`, ` `, `our`, ` `, `dinners.`, ` `, `When`, ` `, `we`, ` `, `met`, ` `, `in`, ` `, `the`, ` `, `street`, ` `, `the`, ` `, `houses`, ` `, `had`, ` `, `grown`, ` `, `sombre.`, ` `, `The`, ` `, `space`, ` `, `of`, ` `, `sky`, ` `, `above`, ` `, `us`, ` `, `was`, ` `, `the`, ` `, `colour`, ` `, `of`, ` `, `ever-changing`, ` `, `violet`, ` `, `and`, ` `, `towards`, ` `, `it`, ` `, `the`, ` `, `lamps`, ` `, `of`, ` `, `the`, ` `, `street`, ` `, `lifted`, ` `, `their`, ` `, `feeble`, ` `, `lanterns.`, ` `, `The`, ` `, `cold`, ` `, `air`, ` `, `stung`, ` `, `us`, ` `, `and`, ` `, `we`, ` `, `played`, ` `, `till`, ` `, `our`, ` `, `bodies`, ` `, `glowed.`, ` `, `Our`, ` `, `shouts`, ` `, `echoed`, ` `, `in`, ` `, `the`, ` `, `silent`, ` `, `street.`, ` `, `The`, ` `, `career`, ` `, `of`, ` `, `our`, ` `, `play`, ` `, `brought`, ` `, `us`, ` `, `through`, ` `, `the`, ` `, `dark`, ` `, `muddy`, ` `, `lanes`, ` `, `behind`, ` `, `the`, ` `, `houses`, ` `, `where`, ` `, `we`, ` `, `ran`, ` `, `the`, ` `, `gauntlet`, ` `, `of`, ` `, `the`, ` `, `rough`, ` `, `tribes`, ` `, `from`, ` `, `the`, ` `, `cottages,`, ` `, `to`, ` `, `the`, ` `, `back`, ` `, `doors`, ` `, `of`, ` `, `the`, ` `, `dark`, ` `, `dripping`, ` `, `gardens`, ` `, `where`, ` `, `odours`, ` `, `arose`, ` `, `from`, ` `, `the`, ` `, `ashpits,`, ` `, `to`, ` `, `the`, ` `, `dark`, ` `, `odorous`, ` `, `stables`, ` `, `where`, ` `, `a`, ` `, `coachman`, ` `, `smoothed`, ` `, `and`, ` `, `combed`, ` `, `the`, ` `, `horse`, ` `, `or`, ` `, `shook`, ` `, `music`, ` `, `from`, ` `, `the`, ` `, `buckled`, ` `, `harness.`, ` `, `When`, ` `, `we`, ` `, `returned`, ` `, `to`, ` `, `the`, ` `, `street`, ` `, `light`, ` `, `from`, ` `, `the`, ` `, `kitchen`, ` `, `windows`, ` `, `had`, ` `, `filled`, ` `, `the`, ` `, `areas.`, ` `, `If`, ` `, `my`, ` `, `uncle`, ` `, `was`, ` `, `seen`, ` `, `turning`, ` `, `the`, ` `, `corner`, ` `, `we`, ` `, `hid`, ` `, `in`, ` `, `the`, ` `, `shadow`, ` `, `until`, ` `, `we`, ` `, `had`, ` `, `seen`, ` `, `him`, ` `, `safely`, ` `, `housed.`, ` `, `Or`, ` `, `if`, ` `, `Mangan\'s`, ` `, `sister`, ` `, `came`, ` `, `out`, ` `, `on`, ` `, `the`, ` `, `doorstep`, ` `, `to`, ` `, `call`, ` `, `her`, ` `, `brother`, ` `, `in`, ` `, `to`, ` `, `his`, ` `, `tea`, ` `, `we`, ` `, `watched`, ` `, `her`, ` `, `from`, ` `, `our`, ` `, `shadow`, ` `, `peer`, ` `, `up`, ` `, `and`, ` `, `down`, ` `, `the`, ` `, `street.`, ` `, `We`, ` `, `waited`, ` `, `to`, ` `, `see`, ` `, `whether`, ` `, `she`, ` `, `would`, ` `, `remain`, ` `, `or`, ` `, `go`, ` `, `in`, ` `, `and,`, ` `, `if`, ` `, `she`, ` `, `remained,`, ` `, `we`, ` `, `left`, ` `, `our`, ` `, `shadow`, ` `, `and`, ` `, `walked`, ` `, `up`, ` `, `to`, ` `, `Mangan\'s`, ` `, `steps`, ` `, `resignedly.`, ` `, `She`, ` `, `was`, ` `, `waiting`, ` `, `for`, ` `, `us,`, ` `, `her`, ` `, `figure`, ` `, `defined`, ` `, `by`, ` `, `the`, ` `, `light`, ` `, `from`, ` `, `the`, ` `, `half-opened`, ` `, `door.`, ` `, `Her`, ` `, `brother`, ` `, `always`, ` `, `teased`, ` `, `her`, ` `, `before`, ` `, `he`, ` `, `obeyed`, ` `, `and`, ` `, `I`, ` `, `stood`, ` `, `by`, ` `, `the`, ` `, `railings`, ` `, `looking`, ` `, `at`, ` `, `her.`, ` `, `Her`, ` `, `dress`, ` `, `swung`, ` `, `as`, ` `, `she`, ` `, `moved`, ` `, `her`, ` `, `body`, ` `, `and`, ` `, `the`, ` `, `soft`, ` `, `rope`, ` `, `of`, ` `, `her`, ` `, `hair`, ` `, `tossed`, ` `, `from`, ` `, `side`, ` `, `to`, ` `, `side.`, ` `]; /* CLO: beginning of end part*/ clo.generatePdf(); /*CLO : end of end part*/ diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 4cba066..f497438 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA52XUW/aMBDHvwvP1bZ2bbf1jUJoaUuIIFsrVRVygyEejh0lDgVN++4ziQlOnJyjPZX6/vezffbdOa9/egLvRO+mFyC2Rb2zXoxEKP+N+DKjOP2cD38KRUSlbUPYsndzcdYLQkKXCWa9m9cSMOJMzMWe4hMEsyw6IkpzFfb971lJ8OWfZ0zWoWhGnOztjAHlJ2fCBE5WKCj3Ia21vVxdV50HPIqQtIAMJYJQh7XWomGQSg0EWsm4eRLgzV0UYQ+RBCCaYgjtDUdDHmQRZlrAxT4ucZqgxvny49v51YWx3wSj6CcjLbiqxkZcHS+Mzw8/T8hVxgJBONM3rQmr3OtLDRln4rCGdpQSGIg3DSLH8M5MlHy4U6KEmMZDnAYnxhYlBL1rFKWo4r7q0YkTLo897SfrbdN2Co4mArdEyXug581xT8V4p00NSYLzueupqxilvWPqBhSl6WkJRuKeX+iut3zXmBXKW5qhPLiVV3LjcaJfsgZIqQJLSIgSy2qUBKKMEpm+FsxRA3Hu72jWXIEUJBeAseE7nI4FjuopfQptYbelc/9yMXYX3kvTrVesowS49sHvzfaW8mCTjtkMr/VENHCG1sLNNbJ6yhgxC1aXAtQlXqGMivykas3AwBpaO7ehx7RhW1pNNQaIBhlFAud9lixFeF9rxqf6coxFiwtQg9tc+tnuPyaSXsBcK0LlCTlRLPay7xC2BmYwtAA33MchZiOeVEqWgdRlVpq/8ROMrbRCBvU44XMPCmUhAAhpfKgQPs8LXlwtiwbNFINkSsTg4fEXCFQagCM++AyLLGFyYhd/UMKgwDWowW4YoyTF2ivr2A2L8U7d0OcbzB6J/o4suqFilPb2bihq96GouspfNNwCs+QOpq7vuH5TdVAcpQCKwnjiTWcQohBYCY5jZTiOlTK3QuYAw536iz60l0JgJSx858WOyVUAy5tN7wDIwQx4z527CXy2SgEyJuPB9GnqghSlATgU7/R8MRi5HfDnmZAPb0fPFoNRaqyce4zsoIPISpqQ5bK5uVZYhQygoTim+8M3I24upYqmy4Dip2TyKdeFlststHEU88QKK1TdWGk3WGqjuVz0W7/ZdF4ptBE91GF1uagT6ZmIUF6DbhE0PWxzzPG6y61RMjstIgNO9Y+0Np4SWomH9u8+WXmFzEbrctCWMyZMfcP7vO09pWg1JfTckGafP8wB2FHS8LB4+webpy2EZBMAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA52VUU/bMBCA/0ueqzE6YFvfShmjm4QqiLZJCCHjXGsvjh3Zl9Jq4r9j0jZx6nJBe3T83Xfns3u9+5cgrDAZJVJnsEoGSclQ+GVhskqBO6o/fxBYKL+X+1UyGg4SLqTKLOhkdNcIBKjyAhxvHUtmJXsMLFuiq/s0fB40ktIaDs6N7WLZeuaV5iiN3nkCqKs6O3m+D2RKPnJl4jNtvr/rUBfSQp27tYCuisbR7HdtX4IqJmEJXDHn2hIm+2UcD8PQcxPciNQIds54G+239w5xehZGW2D5zPg4UtJQlGsimO2pZotQlkvLCujR7BjKc/VdVUBJaoDsjVmBmyIUrQXXZae1m/09ycevn49Pwwc7PnmYXj/M/hx69VvXDiGePf+bL8+V4bmb6htYhD/ESBexPd6amTH0PdI92hAlrBnMWaWwvqlbXCsgtBHb70396p3aBqV6wBSvFEN4hX/LDMUVyIXAQ/Nl14s3QqJp059lXK3+I5GPInLNpfI39K0ocX2LVuoFkSFiCa9YlwL0pbGdkRUpQ6zXluapBei1bTDCVmJqZlQrNwBhcOXrhEhNPfDK7liMbDFMmpXEyY+fv0jhliE8+GRuACurfeJreFJSU407QB/4N7x/AVVnHoriBwAA" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index a3eef89..a339d75 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA61dXXebSrL9L9Krx0PzTd4cx8nxjGP7xjpzZlZWlheWsM1YAl1AiXOz8t8v3SCoalXxIfyUyKrqXV27quguoPVrlqU/8tm7r79mL3Gymr0zT2ZJuIlm72blx+h1djLbZevy0yZd7dZR/nf119PnYrMuv1quwzyPSvXZ7PfJfgTXbobYZukyyvOz7Ol7M9DjLlkWcZrshwIyxLAns22YRUnR2NPiWK2pz9F6+yHKlw3I9zCLwwdgby0wDqEFWMcPy3V64Izqz4O9USzS21fCEfUw1ffdJtaGkOMXP9IvUbHLknyRXkc/1nES8WCE8PHI+XYdF+f/+Oe/eLxG5HiU55/b5yj5mGbngIoDICg1ZUZhGZWL9H0WhS/bNC4VOqamyx6P+xiviyi72GyLn3dFFidPPOyB6FTPLl4WWdQRMlDqeKxluF7u1mERLaLX4q94VTz/EcVPzx3+5TTe3oazXUd6diiNtMRvDPkQZ5FCaWCjZLdpIJuvRwIIt0G4WnwZMva8kus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brSzPyKVDz9nt5bo4lKbt1iLfWIHoDrrxXB4a1rSPcjANh5XWPoC8QHZCxHpcBWYGqC1r6cKwQLVKBN7AcL81xdIk8jq7csxDbDweuTXkTiD6rvMMCikW9IJc3WLhBmjdS4SCwUrGdvpzYwwBFl6OqOt4HRAjIg4AFO+wKy1t8wOFcvlc/Q1ekdGMSLnPYAdZxIVtkKCjBRDk9bQ1owMuHxS0j6t+Wegz1bhG6+nB8Vj0ZuQrcqUPMgMHAYp+LKbKlYwLg6vJTbvVE/W/9OeAqguqmHuwePZAqQR2kAZefh/uvAK6P2BVAIV91VG8OQVXoRXYtJwGL9L/4LhC8DPMEFA+INKjEBUrxI82q35ws0mT/A5UgqUBHjRmhPm8bLHVBIlp7ruqmmlN/djh7cCsEJFnVxDqZWfso4ChDy24TsFV10ErNfWOPTLpvJ7NtvK26eO++fvv9+/8BwR18fI91AAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA62bbW/bOBLHv4vzNpsNn6Qk79rudrd3vSJojb1dFEWg2oytiywZEp04CPLdj5Rkacbm6MHOq8DxDP9D/mZGlGi9TPLsqZjcfH+ZPMTpfHLDzydptNKTm4n9qLeT88kmT+ynVTbfJLr4tfzvxdKsEvvVLImKQlv3yeT1fDdCIJsh1nk200XxLl88NgPdb9KZibN0NxSw8Qx7PllHuU5NE0+rI9pQlzpZ/6aLWSPyGOVx9BPEWxuMU2gFkvjnLMkOFqP69+DVMNPsdutZiHqY6vvuEOtAvOObp+yrNps8LabZF/2UxKmmxTzGxysX6yQ2H/71779ovcbkeJXl83qp049Z/gGgOBCCVqfMKLJZOc3e5zp6WGexdeiY2r7t8br3cWJ0/vtqbZ6/mTxOF7TsgempKzt9mOa6I2Wg1fFasyiZbZLI6Knemv/Gc7P8U8eLZcf6Uh5vH8O7TUd5djiNjOSqCeS3ONelSiOr082qkWy+HinAgkbh8/TrkLHPKruu8VsPv9LX6edBSpXdKUrT6ftBSpXdKUrvp9NBSpXda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RSs/17lAADCDBAOQyuAf8wEcBH3K68Hk88AXJGVDp0hwggqUCSyxEVYiyLkhFjVMf59y7h1RFdfIDIgEj2ktm5wgO/+EAIIPs1ZkYoD1OBvkCqLF6MuKynhSvJ0XRbEaMyx+eVm/ggKICcLgixqhe69DutY6ifgOkHQH0HmpZyoeRZTtYNw8j2wEUYBxSaV1C2asHDpKRU467p8tr93QZiII1DalEXmgTlc/igR+gGFDztX4L98RxFW0PO4kCvTOkemf1+Bg4AUwhlb+HWgJEK+pMkbLOmF3mUG3RvaA2L99gA0sOVpxyW5SPPEH6ggkzKvGrF3nus3yveYD+TcZZupoHU74pBHTB9YJR5VG/Udh6ASfKpz6EhOsMlplywnnEQO4yKnfdmWFRnxmCRgLWJKBdt/jaARJIUFlnnZ6RE1ASFLlVnGIlMDNBdRTrhJVADxAU6LR6JxAVBocZSaVk+zIFcASlwakGAE/F8uZUDJQlUA+pdNk7hgUgQWEE1ErVrlH5virIH5A+lKcxGd5dAjJU3qw35dULTRK4hdQSV8cO7cYNTTQARRVSeVSNsN88FLi8hFRi5AahZSDXGbWuzdFU6o6mTOa7wCjYfeiBDi8SYL4BNd/qFU2T+Te7IDXoAZLYuM0aWmqgTPlVb1DdR/ubLQbWmlHXNu/ehgNPfl1fZ1j9lxzJ/ETqIHRGxW6esrx6Rdhk6e59YrDwYItFjFD/PAq0HgBL7GKud1mq/qyoePB+BKQLDytPsVsNKndRG+QAO7+qPXc7PW8e2BvTdbyutnU333+8vv4f7WxkKT4/AAA="; \ No newline at end of file diff --git a/docs/classes/libclo.Clo.html b/docs/classes/libclo.Clo.html index f6753b0..7597f83 100644 --- a/docs/classes/libclo.Clo.html +++ b/docs/classes/libclo.Clo.html @@ -25,7 +25,7 @@ +
  • Defined in libclo/index.ts:410
  • @@ -64,7 +64,7 @@
  • Returns Clo

  • +
  • Defined in libclo/index.ts:419
  • Properties

    @@ -79,7 +79,7 @@
    [index: string]: any
    +
  • Defined in libclo/index.ts:416
  • mainStream: string[]
    @@ -87,7 +87,7 @@
    +
  • Defined in libclo/index.ts:412
  • preprocessors: Function[]
    @@ -95,7 +95,7 @@
    +
  • Defined in libclo/index.ts:414
  • Methods

    @@ -117,7 +117,7 @@
    +
  • Defined in libclo/index.ts:610
  • +
  • Defined in libclo/index.ts:459
  • Returns any

    +
  • Defined in libclo/index.ts:442
  • +
  • Defined in libclo/index.ts:698
  • Returns void

    +
  • Defined in libclo/index.ts:553
  • +
  • Defined in libclo/index.ts:455
  • -

    Returns Promise<[PDFDocument, TextStyle, fontPathPSNamePair]>

    +
  • Defined in libclo/index.ts:501
  • +
  • Defined in libclo/index.ts:744
  • Returns BoxesItem[]

    +
  • Defined in libclo/index.ts:704
  • +
  • Defined in libclo/index.ts:648
  • Returns void

    +
  • Defined in libclo/index.ts:438
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/enums/canva.FontStyle.html b/docs/enums/canva.FontStyle.html deleted file mode 100644 index 6f182c4..0000000 --- a/docs/enums/canva.FontStyle.html +++ /dev/null @@ -1,80 +0,0 @@ -FontStyle | clo
    -
    - -
    -
    -
    -
    - -

    Enumeration FontStyle

    -
    -
    -
    - -
    -
    -

    Enumeration Members

    -
    -
    -

    Enumeration Members

    -
    - -
    ITALIC: 1
    -
    - -
    NORMAL: 0
    -
    - -
    OBLIQUE: 2
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/enums/canva.TextWeight.html b/docs/enums/canva.TextWeight.html deleted file mode 100644 index 383d177..0000000 --- a/docs/enums/canva.TextWeight.html +++ /dev/null @@ -1,73 +0,0 @@ -TextWeight | clo
    -
    - -
    -
    -
    -
    - -

    Enumeration TextWeight

    -
    -
    -
    - -
    -
    -

    Enumeration Members

    -
    -
    -

    Enumeration Members

    -
    - -
    BOLD: 1
    -
    - -
    REGULAR: 0
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/enums/libclo.Direction.html b/docs/enums/libclo.Direction.html index 4ee6071..bc648c7 100644 --- a/docs/enums/libclo.Direction.html +++ b/docs/enums/libclo.Direction.html @@ -24,7 +24,7 @@ etc.

    +
  • Defined in libclo/index.ts:21
  • @@ -43,22 +43,22 @@ etc.

    BTT: 3
    +
  • Defined in libclo/index.ts:25
  • LTR: 0
    +
  • Defined in libclo/index.ts:22
  • RTL: 1
    +
  • Defined in libclo/index.ts:23
  • TTB: 2
    +
  • Defined in libclo/index.ts:24
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/enums/parser.TokenKind.html b/docs/enums/parser.TokenKind.html deleted file mode 100644 index 02642e4..0000000 --- a/docs/enums/parser.TokenKind.html +++ /dev/null @@ -1,136 +0,0 @@ -TokenKind | clo
    -
    - -
    -
    -
    -
    - -

    Enumeration TokenKind

    -
    -
    -
    - -
    -
    -

    Enumeration Members

    -
    -
    -

    Enumeration Members

    -
    - -
    Comment: 10
    -
    - -
    ExcapeAt: 5
    -
    - -
    ExprMark: 4
    -
    - -
    Id: 8
    -
    - -
    Number: 2
    -
    - -
    Op: 3
    -
    - -
    Paren: 6
    -
    - -
    Semicolon: 1
    -
    - -
    Seperator: 0
    -
    - -
    SpaceNL: 7
    -
    - -
    Str: 9
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/canva.fontStyleTofont.html b/docs/functions/canva.fontStyleTofont.html deleted file mode 100644 index a08f7bd..0000000 --- a/docs/functions/canva.fontStyleTofont.html +++ /dev/null @@ -1,62 +0,0 @@ -fontStyleTofont | clo
    -
    - -
    -
    -
    -
    - -

    Function fontStyleTofont

    -
    -
      - -
    • -

      guess the font path and postscript name of a font style with fontconfig's commands

      -
      -
      -

      Parameters

      -
      -

      Returns fontPathPSNamePair

      pair of the font path and postscript name.

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/canva.putText.html b/docs/functions/canva.putText.html deleted file mode 100644 index 33de618..0000000 --- a/docs/functions/canva.putText.html +++ /dev/null @@ -1,84 +0,0 @@ -putText | clo
    -
    - -
    -
    -
    -
    - -

    Function putText

    -
    -
      - -
    • -

      put text in a clo canva.

      -
      -
      -

      Parameters

      -
        -
      • -
        clo: Clo
        -

        : the clo object

        -
        -
      • -
      • -
        str: string
        -

        input string

        -
        -
      • -
      • -
        sty: TextStyle
        -

        input fontstyle

        -
        -
      • -
      • -
        pageNo: number
      • -
      • -
        x: number
        -

        base x-point from left

        -
        -
      • -
      • -
        y: number
        -

        base y-point from top

        -
        -
      -

      Returns Promise<Clo>

      a new updated clo object

      - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/index.processArgv.html b/docs/functions/index.processArgv.html index 1395090..5a83e94 100644 --- a/docs/functions/index.processArgv.html +++ b/docs/functions/index.processArgv.html @@ -32,7 +32,7 @@

    Returns void

    +
  • Defined in index.ts:33
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.calculateTextWidthHeight.html b/docs/functions/libclo.calculateTextWidthHeight.html index e89a9ab..cb14d54 100644 --- a/docs/functions/libclo.calculateTextWidthHeight.html +++ b/docs/functions/libclo.calculateTextWidthHeight.html @@ -26,13 +26,13 @@

    Parameters

    +
    style: TextStyle

    Returns Promise<BoxesItem[]>

    +
  • Defined in libclo/index.ts:291
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.calculateTextWidthHeightAux.html b/docs/functions/libclo.calculateTextWidthHeightAux.html index 7d13527..3ded441 100644 --- a/docs/functions/libclo.calculateTextWidthHeightAux.html +++ b/docs/functions/libclo.calculateTextWidthHeightAux.html @@ -18,7 +18,7 @@

    Function calculateTextWidthHeightAux

    +
  • Defined in libclo/index.ts:314
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.filterEmptyString.html b/docs/functions/libclo.filterEmptyString.html index 90d8a1d..81d408c 100644 --- a/docs/functions/libclo.filterEmptyString.html +++ b/docs/functions/libclo.filterEmptyString.html @@ -18,7 +18,7 @@

    Function filterEmptyString

    +
  • Defined in libclo/index.ts:235
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.hyphenForClo.html b/docs/functions/libclo.hyphenForClo.html index 89e305f..3223dc0 100644 --- a/docs/functions/libclo.hyphenForClo.html +++ b/docs/functions/libclo.hyphenForClo.html @@ -18,7 +18,7 @@

    Function hyphenForClo

    +
  • Defined in libclo/index.ts:199
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.hyphenTkTree.html b/docs/functions/libclo.hyphenTkTree.html index 2eec815..01e3e0a 100644 --- a/docs/functions/libclo.hyphenTkTree.html +++ b/docs/functions/libclo.hyphenTkTree.html @@ -18,7 +18,7 @@

    Function hyphenTkTree

    +
  • Defined in libclo/index.ts:254
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.ptToPx.html b/docs/functions/libclo.ptToPx.html index c4828de..f8b5a09 100644 --- a/docs/functions/libclo.ptToPx.html +++ b/docs/functions/libclo.ptToPx.html @@ -34,7 +34,7 @@
    +
  • Defined in libclo/index.ts:126
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.spacesToBreakpoint.html b/docs/functions/libclo.spacesToBreakpoint.html index 58b7397..9b9f6b4 100644 --- a/docs/functions/libclo.spacesToBreakpoint.html +++ b/docs/functions/libclo.spacesToBreakpoint.html @@ -18,7 +18,7 @@

    Function spacesToBreakpoint

    +
  • Defined in libclo/index.ts:213
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.splitCJKV.html b/docs/functions/libclo.splitCJKV.html index bd3fe1d..9d395f6 100644 --- a/docs/functions/libclo.splitCJKV.html +++ b/docs/functions/libclo.splitCJKV.html @@ -18,7 +18,7 @@

    Function splitCJKV

    +
  • Defined in libclo/index.ts:179
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/libclo.twoReturnsToNewline.html b/docs/functions/libclo.twoReturnsToNewline.html index 358feae..982caf9 100644 --- a/docs/functions/libclo.twoReturnsToNewline.html +++ b/docs/functions/libclo.twoReturnsToNewline.html @@ -18,7 +18,7 @@

    Function twoReturnsToNewline

    +
  • Defined in libclo/index.ts:142
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/functions/parser.applyComment.html b/docs/functions/parser.applyComment.html deleted file mode 100644 index 782fcd9..0000000 --- a/docs/functions/parser.applyComment.html +++ /dev/null @@ -1,55 +0,0 @@ -applyComment | clo
    -
    - -
    -
    -
    -
    - -

    Function applyComment

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyContent.html b/docs/functions/parser.applyContent.html deleted file mode 100644 index 6871d46..0000000 --- a/docs/functions/parser.applyContent.html +++ /dev/null @@ -1,55 +0,0 @@ -applyContent | clo
    -
    - -
    -
    -
    -
    - -

    Function applyContent

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyImport.html b/docs/functions/parser.applyImport.html deleted file mode 100644 index 4b69675..0000000 --- a/docs/functions/parser.applyImport.html +++ /dev/null @@ -1,55 +0,0 @@ -applyImport | clo
    -
    - -
    -
    -
    -
    - -

    Function applyImport

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyImports.html b/docs/functions/parser.applyImports.html deleted file mode 100644 index 313f50a..0000000 --- a/docs/functions/parser.applyImports.html +++ /dev/null @@ -1,55 +0,0 @@ -applyImports | clo
    -
    - -
    -
    -
    -
    - -

    Function applyImports

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyNotAtText.html b/docs/functions/parser.applyNotAtText.html deleted file mode 100644 index c824516..0000000 --- a/docs/functions/parser.applyNotAtText.html +++ /dev/null @@ -1,55 +0,0 @@ -applyNotAtText | clo
    -
    - -
    -
    -
    -
    - -

    Function applyNotAtText

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyParts.html b/docs/functions/parser.applyParts.html deleted file mode 100644 index 219498e..0000000 --- a/docs/functions/parser.applyParts.html +++ /dev/null @@ -1,57 +0,0 @@ -applyParts | clo
    -
    - -
    -
    -
    -
    - -

    Function applyParts

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyPartsWithoutImport.html b/docs/functions/parser.applyPartsWithoutImport.html deleted file mode 100644 index 4268d34..0000000 --- a/docs/functions/parser.applyPartsWithoutImport.html +++ /dev/null @@ -1,55 +0,0 @@ -applyPartsWithoutImport | clo
    -
    - -
    -
    -
    -
    - -

    Function applyPartsWithoutImport

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applySegment.html b/docs/functions/parser.applySegment.html deleted file mode 100644 index 7532fd0..0000000 --- a/docs/functions/parser.applySegment.html +++ /dev/null @@ -1,55 +0,0 @@ -applySegment | clo
    -
    - -
    -
    -
    -
    - -

    Function applySegment

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applySemiColon.html b/docs/functions/parser.applySemiColon.html deleted file mode 100644 index 44b6fd8..0000000 --- a/docs/functions/parser.applySemiColon.html +++ /dev/null @@ -1,55 +0,0 @@ -applySemiColon | clo
    -
    - -
    -
    -
    -
    - -

    Function applySemiColon

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applySpaceNL.html b/docs/functions/parser.applySpaceNL.html deleted file mode 100644 index 466b1a3..0000000 --- a/docs/functions/parser.applySpaceNL.html +++ /dev/null @@ -1,55 +0,0 @@ -applySpaceNL | clo
    -
    - -
    -
    -
    -
    - -

    Function applySpaceNL

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.applyText.html b/docs/functions/parser.applyText.html deleted file mode 100644 index 3879fbb..0000000 --- a/docs/functions/parser.applyText.html +++ /dev/null @@ -1,55 +0,0 @@ -applyText | clo
    -
    - -
    -
    -
    -
    - -

    Function applyText

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.inputTextToTree.html b/docs/functions/parser.inputTextToTree.html deleted file mode 100644 index 60f7d89..0000000 --- a/docs/functions/parser.inputTextToTree.html +++ /dev/null @@ -1,58 +0,0 @@ -inputTextToTree | clo
    -
    - -
    -
    -
    -
    - -

    Function inputTextToTree

    -
    -
      - -
    • -

      inputText to tkTree (ASTTree)

      -
      -
      -

      Parameters

      -
        -
      • -
        inputText: string
      -

      Returns tkTree

      -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/functions/parser.treeToJS.html b/docs/functions/parser.treeToJS.html deleted file mode 100644 index e3310c5..0000000 --- a/docs/functions/parser.treeToJS.html +++ /dev/null @@ -1,58 +0,0 @@ -treeToJS | clo
    -
    - -
    -
    -
    -
    - -

    Function treeToJS

    -
    -
      - -
    • -

      Convert tree (ASTTree; tkTree) to JS Code.

      -
      -
      -

      Parameters

      -
      -

      Returns string

      -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 3a0d9c5..e0ebddb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -72,8 +72,17 @@
      (hglue 寬度 伸展值)
    (vglue 高度 伸展值)
    (bp 原始模式 斷行模式) ; breakpoint
    (nl) ; newline
    (em 數字)
    (ex 數字)
    (span {"font-family" : "Noto Sans" , "font-size" : 16 })
    (vbox 高度 內容)

    How to generate documents

    +

    store the documents

    +
    @@ -108,10 +117,8 @@ the generated page will be stored in /src.
    +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/canva.Clo.html b/docs/interfaces/canva.Clo.html deleted file mode 100644 index 07b3a91..0000000 --- a/docs/interfaces/canva.Clo.html +++ /dev/null @@ -1,88 +0,0 @@ -Clo | clo
    -
    - -
    -
    -
    -
    - -

    Interface Clo

    -
    -

    a clo document

    -
    -
    -
    -

    Hierarchy

    -
      -
    • Clo
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    PDFCanvas: PDFDocument
    -
    - -
    mainFontStyle?: FontStyle
    -
    - -
    mainText: TextStreamUnit[]
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/canva.CloCommand.html b/docs/interfaces/canva.CloCommand.html deleted file mode 100644 index 32cc089..0000000 --- a/docs/interfaces/canva.CloCommand.html +++ /dev/null @@ -1,77 +0,0 @@ -CloCommand | clo
    -
    - -
    -
    -
    -
    - -

    Interface CloCommand

    -
    -

    Hierarchy

    -
      -
    • CloCommand
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    -
    - -
    cmdName: string
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/canva.TextStyle.html b/docs/interfaces/canva.TextStyle.html deleted file mode 100644 index bf6a4f7..0000000 --- a/docs/interfaces/canva.TextStyle.html +++ /dev/null @@ -1,108 +0,0 @@ -TextStyle | clo
    -
    - -
    -
    -
    -
    - -

    Interface TextStyle

    -
    -

    Font Style Interface

    -
      -
    • family : eg. "FreeSans"
    • -
    • size : in px, not in pt.
    • -
    • textWeight : TextWeight.REGULAR ,etc
    • -
    • fontStyle : FontStyle.ITALIC ,etc
    • -
    -
    -
    -
    -

    Hierarchy

    -
      -
    • TextStyle
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    color?: string
    -
    - -
    family: string
    -
    - -
    fontStyle: FontStyle
    -
    - -
    size: number
    -
    - -
    textWeight: TextWeight
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/canva.fontPathPSNamePair.html b/docs/interfaces/canva.fontPathPSNamePair.html deleted file mode 100644 index 2f4c7d8..0000000 --- a/docs/interfaces/canva.fontPathPSNamePair.html +++ /dev/null @@ -1,77 +0,0 @@ -fontPathPSNamePair | clo
    -
    - -
    -
    -
    -
    - -

    Interface fontPathPSNamePair

    -
    -

    Hierarchy

    -
      -
    • fontPathPSNamePair
    -
    -
    -
    - -
    -
    -

    Properties

    -
    -
    -

    Properties

    -
    - -
    path: string
    -
    - -
    psName: string
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/interfaces/libclo.Box.html b/docs/interfaces/libclo.Box.html index f039494..3f9a8d4 100644 --- a/docs/interfaces/libclo.Box.html +++ b/docs/interfaces/libclo.Box.html @@ -36,7 +36,7 @@
  • FrameBox
  • CharBox
  • +
  • Defined in libclo/index.ts:70
  • @@ -58,37 +58,37 @@
    content: null | string | Box[]
    +
  • Defined in libclo/index.ts:77
  • direction: Direction
    +
  • Defined in libclo/index.ts:74
  • height: number
    +
  • Defined in libclo/index.ts:76
  • -
    textStyle: null | TextStyle
    +
  • Defined in libclo/index.ts:73
  • width: number
    +
  • Defined in libclo/index.ts:75
  • x: null | number
    +
  • Defined in libclo/index.ts:71
  • y: null | number
    +
  • Defined in libclo/index.ts:72
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/libclo.BreakPoint.html b/docs/interfaces/libclo.BreakPoint.html index 0c2eb89..1088207 100644 --- a/docs/interfaces/libclo.BreakPoint.html +++ b/docs/interfaces/libclo.BreakPoint.html @@ -21,7 +21,7 @@ +
  • Defined in libclo/index.ts:36
  • @@ -38,12 +38,12 @@
    newLined: BoxesItem
    +
  • Defined in libclo/index.ts:38
  • original: BoxesItem
    +
  • Defined in libclo/index.ts:37
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/libclo.CharBox.html b/docs/interfaces/libclo.CharBox.html index 2eb5e53..956d92f 100644 --- a/docs/interfaces/libclo.CharBox.html +++ b/docs/interfaces/libclo.CharBox.html @@ -35,7 +35,7 @@ +
  • Defined in libclo/index.ts:53
  • @@ -62,63 +62,63 @@
    content: null | string | Box[]
    +
  • Defined in libclo/index.ts:77
  • direction: Direction
    +
  • Defined in libclo/index.ts:74
  • height: number
    +
  • Defined in libclo/index.ts:76
  • maxX: number
    +
  • Defined in libclo/index.ts:55
  • maxY: number
    +
  • Defined in libclo/index.ts:57
  • minX: number
    +
  • Defined in libclo/index.ts:54
  • minY: number
    +
  • Defined in libclo/index.ts:56
  • -
    textStyle: null | TextStyle
    +
  • Defined in libclo/index.ts:73
  • width: number
    +
  • Defined in libclo/index.ts:75
  • x: null | number
    +
  • Defined in libclo/index.ts:71
  • y: null | number
    +
  • Defined in libclo/index.ts:72
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/libclo.FrameBox.html b/docs/interfaces/libclo.FrameBox.html index 4c3c258..f7ec4fc 100644 --- a/docs/interfaces/libclo.FrameBox.html +++ b/docs/interfaces/libclo.FrameBox.html @@ -31,7 +31,7 @@ +
  • Defined in libclo/index.ts:48
  • @@ -55,54 +55,54 @@
    baseLineskip: null | number
    +
  • Defined in libclo/index.ts:50
  • content: null | string | Box[]
    +
  • Defined in libclo/index.ts:77
  • direction: Direction
    +
  • Defined in libclo/index.ts:74
  • directionInsideLine: Direction
    +
  • Defined in libclo/index.ts:49
  • height: number
    +
  • Defined in libclo/index.ts:76
  • -
    textStyle: null | TextStyle
    +
  • Defined in libclo/index.ts:73
  • width: number
    +
  • Defined in libclo/index.ts:75
  • x: null | number
    +
  • Defined in libclo/index.ts:71
  • y: null | number
    +
  • Defined in libclo/index.ts:72
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/interfaces/libclo.HGlue.html b/docs/interfaces/libclo.HGlue.html index 334c099..a760ae5 100644 --- a/docs/interfaces/libclo.HGlue.html +++ b/docs/interfaces/libclo.HGlue.html @@ -28,7 +28,7 @@ +
  • Defined in libclo/index.ts:32
  • @@ -44,7 +44,7 @@
    stretchFactor: number
    +
  • Defined in libclo/index.ts:33
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/canva.html b/docs/modules/canva.html deleted file mode 100644 index ef34d40..0000000 --- a/docs/modules/canva.html +++ /dev/null @@ -1,69 +0,0 @@ -canva | clo
    -
    - -
    -
    -
    -
    - -

    Module canva

    -
    -
    -

    Index

    -
    -

    Enumerations

    -
    -
    -

    Interfaces

    -
    -
    -

    Type Aliases

    -
    -
    -

    Functions

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/modules/index.html b/docs/modules/index.html index 1ae6766..c836f03 100644 --- a/docs/modules/index.html +++ b/docs/modules/index.html @@ -16,7 +16,7 @@
  • index
  • Module index

    +
  • Defined in index.ts:1
  • Index

    @@ -46,10 +46,8 @@ +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/libclo.html b/docs/modules/libclo.html index 4ef996c..af0db3e 100644 --- a/docs/modules/libclo.html +++ b/docs/modules/libclo.html @@ -16,7 +16,7 @@
  • libclo
  • Module libclo

    +
  • Defined in libclo/index.ts:1
  • Index

    @@ -78,10 +78,8 @@ +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/modules/parser.html b/docs/modules/parser.html deleted file mode 100644 index 715836d..0000000 --- a/docs/modules/parser.html +++ /dev/null @@ -1,87 +0,0 @@ -parser | clo
    -
    - -
    -
    - -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/types/canva.PDFDocument.html b/docs/types/canva.PDFDocument.html deleted file mode 100644 index 2c87e59..0000000 --- a/docs/types/canva.PDFDocument.html +++ /dev/null @@ -1,46 +0,0 @@ -PDFDocument | clo
    -
    - -
    -
    -
    -
    - -

    Type alias PDFDocument

    -
    PDFDocument: PDFKit.PDFDocument
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/types/canva.TextStreamUnit.html b/docs/types/canva.TextStreamUnit.html deleted file mode 100644 index d818ef1..0000000 --- a/docs/types/canva.TextStreamUnit.html +++ /dev/null @@ -1,46 +0,0 @@ -TextStreamUnit | clo
    -
    - -
    -
    -
    -
    - -

    Type alias TextStreamUnit

    -
    TextStreamUnit: string | CloCommand
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/types/libclo.BoxesItem.html b/docs/types/libclo.BoxesItem.html index da76c9a..870c895 100644 --- a/docs/types/libclo.BoxesItem.html +++ b/docs/types/libclo.BoxesItem.html @@ -18,7 +18,7 @@

    Type alias BoxesItem

    BoxesItem: HGlue | Box | BreakPoint | BoxesItem[]
    +
  • Defined in libclo/index.ts:41
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/types/parser.tkTree.html b/docs/types/parser.tkTree.html deleted file mode 100644 index c2662f9..0000000 --- a/docs/types/parser.tkTree.html +++ /dev/null @@ -1,67 +0,0 @@ -tkTree | clo
    -
    - -
    -
    -
    -
    - -

    Type alias tkTree

    -
    tkTree: string | tkTree[]
    -

    convert a tkTree AST to S-expr string

    -
    -
    -

    Param

    the tkTree

    - -

    Returns

    S-expr String

    -

    export function tkTreeToSExp(t: tkTree): string{ - var str = "";

    -

    if (Array.isArray(t)){ - let strArray = t.map((x)=>tkTreeToSExp(x)); - str = "(" + strArray.join("◎") + ")"; - }else{ - if (t=== undefined){ - str = "%undefined" - }else{ - str = t; - } - }

    -

    return str; -}

    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/index.helpDesc.html b/docs/variables/index.helpDesc.html index 42f726b..db1efac 100644 --- a/docs/variables/index.helpDesc.html +++ b/docs/variables/index.helpDesc.html @@ -21,7 +21,7 @@
    +
  • Defined in index.ts:9
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/libclo.A4_IN_PX.html b/docs/variables/libclo.A4_IN_PX.html index 8ff3f99..969b276 100644 --- a/docs/variables/libclo.A4_IN_PX.html +++ b/docs/variables/libclo.A4_IN_PX.html @@ -28,7 +28,7 @@
    width: number
    +
  • Defined in libclo/index.ts:84
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/libclo.cjkvBlocksInRegex.html b/docs/variables/libclo.cjkvBlocksInRegex.html index 7e75535..5585299 100644 --- a/docs/variables/libclo.cjkvBlocksInRegex.html +++ b/docs/variables/libclo.cjkvBlocksInRegex.html @@ -28,7 +28,7 @@
    +
  • Defined in libclo/index.ts:114
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/libclo.cjkvRegexPattern.html b/docs/variables/libclo.cjkvRegexPattern.html index dbcbcce..c2bb8ef 100644 --- a/docs/variables/libclo.cjkvRegexPattern.html +++ b/docs/variables/libclo.cjkvRegexPattern.html @@ -18,7 +18,7 @@

    Variable cjkvRegexPatternConst

    cjkvRegexPattern: RegExp = ...
    +
  • Defined in libclo/index.ts:116
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/libclo.defaultFrameStyle.html b/docs/variables/libclo.defaultFrameStyle.html index 9892df7..a07bfaa 100644 --- a/docs/variables/libclo.defaultFrameStyle.html +++ b/docs/variables/libclo.defaultFrameStyle.html @@ -18,7 +18,7 @@

    Variable defaultFrameStyleConst

    defaultFrameStyle: FrameBox = ...
    +
  • Defined in libclo/index.ts:94
  • +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/libclo.defaultTextStyle.html b/docs/variables/libclo.defaultTextStyle.html index 04e0219..2e3fd63 100644 --- a/docs/variables/libclo.defaultTextStyle.html +++ b/docs/variables/libclo.defaultTextStyle.html @@ -16,9 +16,9 @@
  • libclo
  • defaultTextStyle
  • Variable defaultTextStyleConst

    -
    defaultTextStyle: TextStyle = ...
    +
  • libclo
  • Generated using TypeDoc

    \ No newline at end of file diff --git a/docs/variables/parser.CONTENT.html b/docs/variables/parser.CONTENT.html deleted file mode 100644 index f12d412..0000000 --- a/docs/variables/parser.CONTENT.html +++ /dev/null @@ -1,46 +0,0 @@ -CONTENT | clo
    -
    - -
    -
    -
    -
    - -

    Variable CONTENTConst

    -
    CONTENT: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.IMPORT.html b/docs/variables/parser.IMPORT.html deleted file mode 100644 index 2d6b01d..0000000 --- a/docs/variables/parser.IMPORT.html +++ /dev/null @@ -1,46 +0,0 @@ -IMPORT | clo
    -
    - -
    -
    -
    -
    - -

    Variable IMPORTConst

    -
    IMPORT: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.IMPORTEE.html b/docs/variables/parser.IMPORTEE.html deleted file mode 100644 index 98e22ae..0000000 --- a/docs/variables/parser.IMPORTEE.html +++ /dev/null @@ -1,49 +0,0 @@ -IMPORTEE | clo
    -
    - -
    -
    -
    -
    - -

    Variable IMPORTEE

    -
    IMPORTEE: Parser<TokenKind, Token<TokenKind>> = ...
    -

    IMPORTEE: Number, Op, Paren, Id, Str, Comment,

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.IMPORTS.html b/docs/variables/parser.IMPORTS.html deleted file mode 100644 index 2d285f6..0000000 --- a/docs/variables/parser.IMPORTS.html +++ /dev/null @@ -1,46 +0,0 @@ -IMPORTS | clo
    -
    - -
    -
    -
    -
    - -

    Variable IMPORTSConst

    -
    IMPORTS: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.NOT_AT.html b/docs/variables/parser.NOT_AT.html deleted file mode 100644 index 95552af..0000000 --- a/docs/variables/parser.NOT_AT.html +++ /dev/null @@ -1,46 +0,0 @@ -NOT_AT | clo
    -
    - -
    -
    -
    -
    - -

    Variable NOT_AT

    -
    NOT_AT: Parser<TokenKind, Token<TokenKind>> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.NOT_AT_TEXT.html b/docs/variables/parser.NOT_AT_TEXT.html deleted file mode 100644 index 44433b9..0000000 --- a/docs/variables/parser.NOT_AT_TEXT.html +++ /dev/null @@ -1,46 +0,0 @@ -NOT_AT_TEXT | clo
    -
    - -
    -
    -
    -
    - -

    Variable NOT_AT_TEXTConst

    -
    NOT_AT_TEXT: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.PROG.html b/docs/variables/parser.PROG.html deleted file mode 100644 index a31efb0..0000000 --- a/docs/variables/parser.PROG.html +++ /dev/null @@ -1,55 +0,0 @@ -PROG | clo
    -
    - -
    -
    -
    -
    - -

    Variable PROGConst

    -
    PROG: Rule<TokenKind, tkTree> = ...
    - -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.SEGMENT.html b/docs/variables/parser.SEGMENT.html deleted file mode 100644 index 3468d1c..0000000 --- a/docs/variables/parser.SEGMENT.html +++ /dev/null @@ -1,46 +0,0 @@ -SEGMENT | clo
    -
    - -
    -
    -
    -
    - -

    Variable SEGMENTConst

    -
    SEGMENT: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.SEMICOLON.html b/docs/variables/parser.SEMICOLON.html deleted file mode 100644 index 06a20ab..0000000 --- a/docs/variables/parser.SEMICOLON.html +++ /dev/null @@ -1,46 +0,0 @@ -SEMICOLON | clo
    -
    - -
    -
    -
    -
    - -

    Variable SEMICOLONConst

    -
    SEMICOLON: Rule<TokenKind, tkTree> = ...
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.lexer.html b/docs/variables/parser.lexer.html deleted file mode 100644 index 8d9fe73..0000000 --- a/docs/variables/parser.lexer.html +++ /dev/null @@ -1,49 +0,0 @@ -lexer | clo
    -
    - -
    -
    -
    -
    - -

    Variable lexerConst

    -
    lexer: Lexer<TokenKind> = ...
    -

    Parsing

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.outputEnd.html b/docs/variables/parser.outputEnd.html deleted file mode 100644 index 287e1fb..0000000 --- a/docs/variables/parser.outputEnd.html +++ /dev/null @@ -1,49 +0,0 @@ -outputEnd | clo
    -
    - -
    -
    -
    -
    - -

    Variable outputEnd

    -
    outputEnd: string = ...
    -

    the end part of the output JS code : after content part

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.outputHead.html b/docs/variables/parser.outputHead.html deleted file mode 100644 index 864f736..0000000 --- a/docs/variables/parser.outputHead.html +++ /dev/null @@ -1,49 +0,0 @@ -outputHead | clo
    -
    - -
    -
    -
    -
    - -

    Variable outputHead

    -
    outputHead: string = ...
    -

    the head part of the output JS code : before import

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/docs/variables/parser.outputMiddle.html b/docs/variables/parser.outputMiddle.html deleted file mode 100644 index 9272394..0000000 --- a/docs/variables/parser.outputMiddle.html +++ /dev/null @@ -1,49 +0,0 @@ -outputMiddle | clo
    -
    - -
    -
    -
    -
    - -

    Variable outputMiddle

    -
    outputMiddle: string = ...
    -

    the middle part of the output JS code : between import part and content part

    -
    -
    -
    - -
    -
    -

    Generated using TypeDoc

    -
    \ No newline at end of file diff --git a/output.pdf b/output.pdf index 11d94c0..a010b9f 100644 Binary files a/output.pdf and b/output.pdf differ diff --git a/package-lock.json b/package-lock.json index 485944b..e359d9b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "fontkit": "^2.0.2", "hyphen": "^1.7.0", "jsdom": "^22.1.0", + "memfs": "^4.6.0", "minimist": "^1.2.8", "npx": "^10.2.2", "pdf-lib": "^1.17.1", @@ -776,11 +777,6 @@ "tslib": "^2.4.0" } }, - "node_modules/@swc/helpers/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/@tootallnate/once": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", @@ -2702,6 +2698,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "peer": true + }, "node_modules/fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -3324,6 +3326,14 @@ "node": ">= 6" } }, + "node_modules/hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==", + "engines": { + "node": ">=10.18" + } + }, "node_modules/hyphen": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/hyphen/-/hyphen-1.7.0.tgz", @@ -3992,6 +4002,41 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "node_modules/json-joy": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/json-joy/-/json-joy-9.9.1.tgz", + "integrity": "sha512-/d7th2nbQRBQ/nqTkBe6KjjvDciSwn9UICmndwk3Ed/Bk9AqkTRm4PnLVfXG4DKbT0rEY0nKnwE7NqZlqKE6kg==", + "dependencies": { + "arg": "^5.0.2", + "hyperdyperid": "^1.2.0" + }, + "bin": { + "jj": "bin/jj.js", + "json-pack": "bin/json-pack.js", + "json-pack-test": "bin/json-pack-test.js", + "json-patch": "bin/json-patch.js", + "json-patch-test": "bin/json-patch-test.js", + "json-pointer": "bin/json-pointer.js", + "json-pointer-test": "bin/json-pointer-test.js", + "json-unpack": "bin/json-unpack.js" + }, + "engines": { + "node": ">=10.0" + }, + "funding": { + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "quill-delta": "^5", + "rxjs": "7", + "tslib": "2" + } + }, + "node_modules/json-joy/node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4040,11 +4085,6 @@ "tslib": "^2.4.0" } }, - "node_modules/legacy-swc-helpers/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4090,12 +4130,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "peer": true + }, "node_modules/lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "peer": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4254,6 +4306,25 @@ "node": ">= 12" } }, + "node_modules/memfs": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.6.0.tgz", + "integrity": "sha512-I6mhA1//KEZfKRQT9LujyW6lRbX7RkC24xKododIDO3AGShcaFAMKElv1yFGWX8fD4UaSiwasr3NeQ5TdtHY1A==", + "dependencies": { + "json-joy": "^9.2.0", + "thingies": "^1.11.1" + }, + "engines": { + "node": ">= 4.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/streamich" + }, + "peerDependencies": { + "tslib": "2" + } + }, "node_modules/merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -9684,6 +9755,11 @@ "tslib": "^1.11.1" } }, + "node_modules/pdf-lib/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/pdfkit": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/pdfkit/-/pdfkit-0.13.0.tgz", @@ -9724,11 +9800,6 @@ "resolved": "https://registry.npmjs.org/restructure/-/restructure-2.0.1.tgz", "integrity": "sha512-e0dOpjm5DseomnXx2M5lpdZ5zoHqF1+bqdMJUohoYVVQa7cBdnk7fdmeI6byNWP/kiME72EeTiSypTCVnpLiDg==" }, - "node_modules/pdfkit/node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -9875,6 +9946,20 @@ } ] }, + "node_modules/quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "peer": true, + "dependencies": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, "node_modules/randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -10040,6 +10125,15 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "peer": true, + "dependencies": { + "tslib": "^2.1.0" + } + }, "node_modules/safe-array-concat": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", @@ -10436,6 +10530,17 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/thingies": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.14.1.tgz", + "integrity": "sha512-ktiTHLvVsS5Cifx8zbvg7x4clgf3AS+52gMSGlW+fvk8xYzog8f9qHvivjpQF56NHCKKpj4O1wI6tH92V4a0rQ==", + "engines": { + "node": ">=10.18" + }, + "peerDependencies": { + "tslib": "^2" + } + }, "node_modules/tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -10555,9 +10660,9 @@ } }, "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "node_modules/tslint": { "version": "6.1.3", @@ -10590,6 +10695,12 @@ "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" } }, + "node_modules/tslint/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", @@ -10602,6 +10713,12 @@ "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -11808,13 +11925,6 @@ "requires": { "legacy-swc-helpers": "npm:@swc/helpers@=0.4.14", "tslib": "^2.4.0" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - } } }, "@tootallnate/once": { @@ -13216,6 +13326,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "peer": true + }, "fast-glob": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", @@ -13667,6 +13783,11 @@ "debug": "4" } }, + "hyperdyperid": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz", + "integrity": "sha512-Y93lCzHYgGWdrJ66yIktxiaGULYc6oGiABxhcO5AufBeOyoIdZF7bIfLaOrbM0iGIOXQQgxxRrFEnb+Y6w1n4A==" + }, "hyphen": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/hyphen/-/hyphen-1.7.0.tgz", @@ -14133,6 +14254,22 @@ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true }, + "json-joy": { + "version": "9.9.1", + "resolved": "https://registry.npmjs.org/json-joy/-/json-joy-9.9.1.tgz", + "integrity": "sha512-/d7th2nbQRBQ/nqTkBe6KjjvDciSwn9UICmndwk3Ed/Bk9AqkTRm4PnLVfXG4DKbT0rEY0nKnwE7NqZlqKE6kg==", + "requires": { + "arg": "^5.0.2", + "hyperdyperid": "^1.2.0" + }, + "dependencies": { + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==" + } + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -14175,13 +14312,6 @@ "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==", "requires": { "tslib": "^2.4.0" - }, - "dependencies": { - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" - } } }, "levn": { @@ -14219,12 +14349,24 @@ "p-locate": "^5.0.0" } }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==", + "peer": true + }, "lodash.flattendeep": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", "dev": true }, + "lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ==", + "peer": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -14342,6 +14484,15 @@ "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, + "memfs": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/memfs/-/memfs-4.6.0.tgz", + "integrity": "sha512-I6mhA1//KEZfKRQT9LujyW6lRbX7RkC24xKododIDO3AGShcaFAMKElv1yFGWX8fD4UaSiwasr3NeQ5TdtHY1A==", + "requires": { + "json-joy": "^9.2.0", + "thingies": "^1.11.1" + } + }, "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", @@ -18450,6 +18601,13 @@ "@pdf-lib/upng": "^1.0.1", "pako": "^1.0.11", "tslib": "^1.11.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } } }, "pdfkit": { @@ -18491,11 +18649,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/restructure/-/restructure-2.0.1.tgz", "integrity": "sha512-e0dOpjm5DseomnXx2M5lpdZ5zoHqF1+bqdMJUohoYVVQa7cBdnk7fdmeI6byNWP/kiME72EeTiSypTCVnpLiDg==" - }, - "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" } } }, @@ -18600,6 +18753,17 @@ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", "dev": true }, + "quill-delta": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/quill-delta/-/quill-delta-5.1.0.tgz", + "integrity": "sha512-X74oCeRI4/p0ucjb5Ma8adTXd9Scumz367kkMK5V/IatcX6A0vlgLgKbzXWy5nZmCGeNJm2oQX0d2Eqj+ZIlCA==", + "peer": true, + "requires": { + "fast-diff": "^1.3.0", + "lodash.clonedeep": "^4.5.0", + "lodash.isequal": "^4.5.0" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -18714,6 +18878,15 @@ "queue-microtask": "^1.2.2" } }, + "rxjs": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", + "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", + "peer": true, + "requires": { + "tslib": "^2.1.0" + } + }, "safe-array-concat": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", @@ -19000,6 +19173,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "thingies": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/thingies/-/thingies-1.14.1.tgz", + "integrity": "sha512-ktiTHLvVsS5Cifx8zbvg7x4clgf3AS+52gMSGlW+fvk8xYzog8f9qHvivjpQF56NHCKKpj4O1wI6tH92V4a0rQ==", + "requires": {} + }, "tiny-inflate": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/tiny-inflate/-/tiny-inflate-1.0.3.tgz", @@ -19080,9 +19259,9 @@ } }, "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "tslint": { "version": "6.1.3", @@ -19103,6 +19282,14 @@ "semver": "^5.3.0", "tslib": "^1.13.0", "tsutils": "^2.29.0" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "tsutils": { @@ -19112,6 +19299,14 @@ "dev": true, "requires": { "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } } }, "type-check": { diff --git a/package.json b/package.json index df0bcad..462239a 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,7 @@ "fontkit": "^2.0.2", "hyphen": "^1.7.0", "jsdom": "^22.1.0", + "memfs": "^4.6.0", "minimist": "^1.2.8", "npx": "^10.2.2", "pdf-lib": "^1.17.1", diff --git a/src/libclo/breakLines.js b/src/libclo/breakLines.js index 14a7836..c7319be 100644 --- a/src/libclo/breakLines.js +++ b/src/libclo/breakLines.js @@ -34,6 +34,11 @@ class BreakLineAlgorithm { return item.width; } } + /**segement node of one paragraph into lines. + * @args items: nodes of a line + * @args linewidth: the line width + * @returns segmented nodes into lines + */ segmentedNodes(items, lineWidth) { let lineWidthFixed = lineWidth; this.totalCost(items, lineWidthFixed); diff --git a/src/libclo/breakLines.ts b/src/libclo/breakLines.ts index 7ab8c0d..f3f6a3c 100644 --- a/src/libclo/breakLines.ts +++ b/src/libclo/breakLines.ts @@ -49,7 +49,12 @@ export class BreakLineAlgorithm { return item.width; } } - + + /**segement node of one paragraph into lines. + * @args items: nodes of a line + * @args linewidth: the line width + * @returns segmented nodes into lines + */ segmentedNodes(items : BoxesItem[], lineWidth : number) : BoxesItem[][]{ let lineWidthFixed = lineWidth; diff --git a/src/libclo/index.js b/src/libclo/index.js index 9d9e8a8..fe92ce1 100644 --- a/src/libclo/index.js +++ b/src/libclo/index.js @@ -32,12 +32,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; Object.defineProperty(exports, "__esModule", { value: true }); -exports.Clo = exports.calculateTextWidthHeightAux = exports.calculateTextWidthHeight = exports.hyphenTkTree = exports.filterEmptyString = exports.spacesToBreakpoint = exports.hyphenForClo = exports.splitCJKV = exports.twoReturnsToNewline = exports.ptToPx = exports.cjkvRegexPattern = exports.cjkvBlocksInRegex = exports.defaultFrameStyle = exports.defaultTextStyle = exports.A4_IN_PX = exports.Direction = void 0; +exports.Clo = exports.applyVOffset = exports.putInVBox = exports.calculateTextWidthHeightAux = exports.calculateTextWidthHeight = exports.hyphenTkTree = exports.filterEmptyString = exports.spacesToBreakpoint = exports.hyphenForClo = exports.splitCJKV = exports.twoReturnsToNewline = exports.ptToPx = exports.cjkvRegexPattern = exports.cjkvBlocksInRegex = exports.defaultFrameStyle = exports.defaultTextStyle = exports.A4_IN_PX = exports.Direction = void 0; const canva_1 = require("../canva"); const fontkit = __importStar(require("fontkit")); const breakLines = __importStar(require("./breakLines")); const PDFDocument = require('pdfkit'); -const fs = __importStar(require("fs")); +const memfs_1 = require("memfs"); /** * TYPES */ @@ -60,7 +60,7 @@ var Direction; exports.A4_IN_PX = { "width": 793.7, "height": 1122.5 }; exports.defaultTextStyle = { - family: "FreeSerif", + family: "Noto Sans CJK TC", size: ptToPx(12), textWeight: canva_1.TextWeight.REGULAR, fontStyle: canva_1.FontStyle.ITALIC, @@ -103,7 +103,7 @@ exports.ptToPx = ptToPx; * REGISTER PART */ /** - * convert '\n\n' to newline command ["nl"] + * convert '\n\n' to new paragraph command ["br"] * @param arr the input `tkTree` * @param clo the `Clo` object * @returns the input tktree @@ -123,7 +123,7 @@ function twoReturnsToNewline(arr, clo) { for (let j = 0; j < middle.length; j++) { var item = middle[j]; if (!Array.isArray(item) && item == "\n\n") { - result.push(["nl"]); // push a newline command to the result `tkTree` + result.push(["br"]); // push a newline command to the result `tkTree` } else { result.push(middle[j]); @@ -303,6 +303,7 @@ function calculateTextWidthHeightAux(element, style, styleCache, fontCache) { result.push(item); } return [result, styleCache, fontCache]; + // break point of a line } else if (element[0] == "bp") { var beforeNewLine = (yield calculateTextWidthHeightAux(element[1], style, styleCache, fontCache))[0]; @@ -318,17 +319,65 @@ function calculateTextWidthHeightAux(element, style, styleCache, fontCache) { newLined: afterNewLine, }; return [breakPointNode, styleCache, fontCache]; + // hglue } else if (element[0] == "hglue" && !Array.isArray(element[1])) { - let hGlue = { stretchFactor: parseFloat(element[1]) }; + let hGlue = { + isHorizonalGlue: true, + stretchFactor: parseFloat(element[1]) + }; return [hGlue, styleCache, fontCache]; } + // new line
    + else if (element[0] == "br") { + let brBoxItem = yield calculateTextWidthHeightAux(["hglue", "10000"], style, styleCache, fontCache); + //
    + let BR = { + isBR: true, + original: brBoxItem[0], + newLined: brBoxItem[0] + }; + return [BR, styleCache, fontCache]; + } else { return [yield calculateTextWidthHeight(element, style), styleCache, fontCache]; } }); } exports.calculateTextWidthHeightAux = calculateTextWidthHeightAux; +/** + * put childrenBox inside VBox + */ +function putInVBox(childrenBox, parentBox) { + var voffset = Array(childrenBox.length).fill(0); + for (var i = 0; i < childrenBox.length - 1; i++) { + voffset[i + 1] = voffset[i] + childrenBox[i].height; + } + console.log("~", voffset); + for (var i = 0; i < childrenBox.length; i++) { + childrenBox[i] = applyVOffset(childrenBox[i], voffset[i]); + childrenBox[i].y += voffset[i]; + } + parentBox.content = childrenBox; + return parentBox; +} +exports.putInVBox = putInVBox; +/** + * apply vertical offset to a box + * @param box the box to be applied + * @param voffset the vertical offset + * @returns applied box + */ +function applyVOffset(box, voffset) { + if (box.y !== null) { + box.y += voffset; + } + if (Array.isArray(box.content)) { + box.content = box.content.map((x) => applyVOffset(x, voffset)); + } + return box; +} +exports.applyVOffset = applyVOffset; /** * whole document-representing class */ @@ -375,14 +424,28 @@ class Clo { } // generate the width and height of the stream let defaultFontStyle = this.attrs.defaultFrameStyle.textStyle; - let a = yield calculateTextWidthHeight(preprocessed, defaultFontStyle); + // calculate the width and height of each chars + let calculated = yield calculateTextWidthHeight(preprocessed, defaultFontStyle); + // + let paragraphized = this.paragraphize(calculated); let breakLineAlgorithms = new breakLines.BreakLineAlgorithm(); - let segmentedNodes = breakLineAlgorithms.segmentedNodes(a, this.attrs.defaultFrameStyle.width); - let segmentedNodesToBox = this.segmentedNodesToFrameBox(segmentedNodes, this.attrs.defaultFrameStyle); - let boxesFixed = this.fixenBoxesPosition(segmentedNodesToBox); + let segmentedNodes = paragraphized.map((x) => breakLineAlgorithms.segmentedNodes(x, this.attrs.defaultFrameStyle.width)); + let segmentedNodesToBox = segmentedNodes.map((x) => this.segmentedNodesToFrameBoxAux(x, this.attrs.defaultFrameStyle)); + let boxWithParagraph = putInVBox(segmentedNodesToBox, this.attrs.defaultFrameStyle); + console.log(boxWithParagraph); + // fix the bug of main Frame x & y + if (boxWithParagraph.x !== null) { + boxWithParagraph.x *= 0.75; + } + if (boxWithParagraph.y !== null) { + boxWithParagraph.y *= 0.75; + } + let boxesFixed = this.fixenBoxesPosition(boxWithParagraph); + boxesFixed.content.map((e) => { console.log(e.y); }); // generate pdf const doc = new PDFDocument({ size: 'A4' }); - doc.pipe(fs.createWriteStream('output.pdf')); + // let fsMemory = memfs(); + doc.pipe(memfs_1.vol.createWriteStream('output.pdf')); this.grid(doc); let styleCache = {}; let fontPairCache = { path: "", psName: "" }; @@ -391,6 +454,20 @@ class Clo { doc.end(); }); } + paragraphize(calculated) { + var res = [[]]; + for (var i = 0; i < calculated.length; i++) { + if ("isBR" in (calculated[i])) { + res[res.length - 1] = res[res.length - 1].concat(calculated[i]); + res.push([]); + } + else { + res[res.length - 1] = res[res.length - 1].concat(calculated[i]); + } + } + res = res.filter((x) => x.length !== 0); + return res; + } putText(doc, box, styleCache, fontPairCache) { return __awaiter(this, void 0, void 0, function* () { var fontPair; @@ -402,13 +479,16 @@ class Clo { fontPair = (0, canva_1.fontStyleTofont)(box.textStyle); styleCache = box.textStyle; fontPairCache = fontPair; + let textColor = box.textStyle.color; if (fontPair.path.match(/\.ttc$/g)) { doc + .fillColor(textColor !== undefined ? textColor : "#000000") .font(fontPair.path, fontPair.psName) .fontSize(box.textStyle.size * 0.75); } else { doc + .fillColor(textColor !== undefined ? textColor : "#000000") .font(fontPair.path) .fontSize(box.textStyle.size * 0.75); // 0.75 must added! } @@ -516,7 +596,7 @@ class Clo { * @param frame the frame to be layed out. * @returns the big `Box`. */ - segmentedNodesToFrameBox(segmentedNodes, frame) { + segmentedNodesToFrameBoxAux(segmentedNodes, frame) { let baseLineskip = frame.baseLineskip; let boxArrayEmpty = []; let bigBox = { @@ -549,6 +629,8 @@ class Clo { bigBoxContent.push(currentLineBox); } bigBox.content = bigBoxContent; + let bigBoxHeight = bigBoxContent.map((x) => x.height).reduce((x, y) => x + y, 0); + bigBox.height = bigBoxHeight; return bigBox; } /** diff --git a/src/libclo/index.ts b/src/libclo/index.ts index f48f448..d074e9c 100644 --- a/src/libclo/index.ts +++ b/src/libclo/index.ts @@ -6,6 +6,7 @@ const PDFDocument = require('pdfkit'); import * as fs from "fs"; import { Style } from "util"; import { time } from "console"; +import {memfs} from "memfs"; /** @@ -24,12 +25,17 @@ export enum Direction{ TTB, BTT, } - /** * Horizonal glue. * - stretchFactor : the stretch factor in float */ export interface HGlue{ + isHorizonalGlue : true, + stretchFactor: number +} + +export interface VGlue{ + isHorizonalGlue : false, stretchFactor: number } @@ -38,6 +44,11 @@ export interface BreakPoint{ newLined : BoxesItem } +/** BR is like html br */ +export interface BR extends BreakPoint{ + isBR : true; +} + export type BoxesItem = HGlue | Box | BreakPoint | BoxesItem[] ; /** @@ -85,7 +96,7 @@ export const A4_IN_PX = {"width" : 793.7, "height" : 1122.5}; export const defaultTextStyle : TextStyle = { - family : "FreeSerif", + family : "Noto Sans CJK TC", size : ptToPx(12), textWeight : TextWeight.REGULAR, fontStyle : FontStyle.ITALIC, @@ -134,7 +145,7 @@ export function ptToPx(pt : number) : number{ */ /** - * convert '\n\n' to newline command ["nl"] + * convert '\n\n' to new paragraph command ["br"] * @param arr the input `tkTree` * @param clo the `Clo` object * @returns the input tktree @@ -156,7 +167,7 @@ export function twoReturnsToNewline(arr : tkTree, clo : Clo): tkTree{ for (let j = 0; j < middle.length; j++){ var item = middle[j]; if (!Array.isArray(item) && item == "\n\n"){ - result.push(["nl"]); // push a newline command to the result `tkTree` + result.push(["br"]); // push a newline command to the result `tkTree` } else{ result.push(middle[j]); @@ -372,7 +383,7 @@ export async function calculateTextWidthHeightAux(element : tkTree, - + // break point of a line }else if(element[0] == "bp"){ @@ -391,18 +402,66 @@ export async function calculateTextWidthHeightAux(element : tkTree, newLined : afterNewLine, } + return [breakPointNode, styleCache, fontCache]; + // hglue }else if(element[0] == "hglue" && !Array.isArray(element[1])){ - let hGlue : HGlue = {stretchFactor : parseFloat(element[1])} + let hGlue : HGlue = { + isHorizonalGlue : true, + stretchFactor : parseFloat(element[1])} return [hGlue, styleCache, fontCache]; } + // new line
    + else if(element[0] == "br"){ + let brBoxItem = await calculateTextWidthHeightAux(["hglue", "10000"], + style, styleCache, fontCache); + //
    + let BR : BR = { + isBR : true, + original : brBoxItem[0], + newLined : brBoxItem[0]}; + return [BR, styleCache, fontCache]; + } else{ return [await calculateTextWidthHeight(element, style), styleCache, fontCache]; } } +/** + * put childrenBox inside VBox + */ +export function putInVBox(childrenBox: Box[], parentBox: Box) : Box{ + var voffset = Array(childrenBox.length).fill(0); + for (var i=0;iapplyVOffset(x, voffset)); + } + return box; +} /** * whole document-representing class @@ -468,20 +527,34 @@ export class Clo{ let defaultFontStyle : TextStyle = this.attrs.defaultFrameStyle.textStyle; + // calculate the width and height of each chars + let calculated = await calculateTextWidthHeight(preprocessed, defaultFontStyle); + + // + let paragraphized = this.paragraphize(calculated); - let a = await calculateTextWidthHeight(preprocessed, defaultFontStyle); let breakLineAlgorithms = new breakLines.BreakLineAlgorithm(); - let segmentedNodes = breakLineAlgorithms.segmentedNodes(a, this.attrs.defaultFrameStyle.width); + let segmentedNodes = paragraphized.map((x)=>breakLineAlgorithms.segmentedNodes(x, this.attrs.defaultFrameStyle.width)); + + let segmentedNodesToBox = segmentedNodes.map((x)=> + this.segmentedNodesToFrameBoxAux(x, this.attrs.defaultFrameStyle)); - let segmentedNodesToBox = - this.segmentedNodesToFrameBox(segmentedNodes, this.attrs.defaultFrameStyle); + let boxWithParagraph = putInVBox(segmentedNodesToBox, this.attrs.defaultFrameStyle); + console.log(boxWithParagraph); - let boxesFixed = this.fixenBoxesPosition(segmentedNodesToBox); + // fix the bug of main Frame x & y + if(boxWithParagraph.x !== null) + {boxWithParagraph.x *= 0.75} + if(boxWithParagraph.y !== null) + {boxWithParagraph.y *= 0.75} + + let boxesFixed = this.fixenBoxesPosition(boxWithParagraph); + (boxesFixed.content).map((e)=>{console.log(e.y)}); // generate pdf @@ -498,6 +571,21 @@ export class Clo{ } + paragraphize(calculated : BoxesItem[]): BoxesItem[][]{ + var res : BoxesItem[][] = [[]]; + for (var i=0;i(calculated[i])){ + res[res.length-1] = res[res.length-1].concat(calculated[i]); + res.push([]); + }else{ + res[res.length-1] = res[res.length-1].concat(calculated[i]); + } + } + + res = res.filter((x)=>x.length !== 0); + return res; + } + async putText(doc : PDFKit.PDFDocument, box : Box, styleCache : TextStyle, fontPairCache : fontPathPSNamePair): Promise<[PDFKit.PDFDocument, TextStyle, fontPathPSNamePair]>{ @@ -512,13 +600,16 @@ export class Clo{ fontPair = fontStyleTofont(box.textStyle); styleCache = box.textStyle; fontPairCache = fontPair; + let textColor = box.textStyle.color; if (fontPair.path.match(/\.ttc$/g)){ doc + .fillColor(textColor !== undefined ? textColor : "#000000") .font(fontPair.path, fontPair.psName) .fontSize(box.textStyle.size * 0.75);} else{ doc + .fillColor(textColor !== undefined ? textColor : "#000000") .font(fontPair.path) .fontSize(box.textStyle.size * 0.75); // 0.75 must added! } @@ -630,8 +721,6 @@ export class Clo{ } } - - box.content[i] = this.fixenBoxesPosition(box.content[i]); } } @@ -645,7 +734,7 @@ export class Clo{ * @param frame the frame to be layed out. * @returns the big `Box`. */ - segmentedNodesToFrameBox(segmentedNodes : BoxesItem[][], frame : FrameBox) : Box{ + segmentedNodesToFrameBoxAux(segmentedNodes : BoxesItem[][], frame : FrameBox) : Box{ let baseLineskip = frame.baseLineskip; let boxArrayEmpty : Box[] = []; let bigBox : Box = { @@ -686,6 +775,8 @@ export class Clo{ } bigBox.content = bigBoxContent; + let bigBoxHeight = bigBoxContent.map((x)=>x.height).reduce((x,y)=>x+y, 0); + bigBox.height = bigBoxHeight; return bigBox; } diff --git a/src/parser.ts b/src/parser.ts index 8100f55..867b8f7 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -1,6 +1,7 @@ /** * parser.ts - parser and js generator of clo. */ +import { text } from 'pdfkit'; import * as p from 'typescript-parsec'; import { Token } from 'typescript-parsec'; @@ -60,6 +61,7 @@ export const lexer = p.buildLexer([ [true, /^[\+\-\*\/\&\|\!\^\<\>\~\=\?]+/g, TokenKind.Op], [true, /^\@/g, TokenKind.ExprMark], [true, /^[()\[\]{}]/g, TokenKind.Paren], + [true, /^[\`]([^\`]|[\\].)*[\`]/g, TokenKind.Str], [true, /^[\"]([^\"]|[\\].)*[\"]/g, TokenKind.Str], [true, /^[\']([^\']|[\\].)*[\']/g, TokenKind.Str], [true, /^[()\[\]{}]/g, TokenKind.Paren], @@ -141,9 +143,12 @@ export function applyNotAtText(value : Token): tkTree{ }; export function applyText (input : tkTree): tkTree[]{ + return ["%text", input]; }; + + export function applyContent(input : tkTree[]): tkTree[]{ return ["%content", input]; }; @@ -269,6 +274,16 @@ clo.generatePdf(); /*CLO : end of end part*/ ` +export function splitText(input : tkTree): tkTree{ + var ret; + if (!Array.isArray(input)){ + ret = input.split(/(\s+)/); + }else{ + ret = input.map((x)=>splitText(x)); + } + return ret; +} + /** * Convert `tree` (ASTTree; `tkTree`) to JS Code. */ @@ -312,15 +327,17 @@ export function treeToJS(tree : tkTree): string{ } } if (head == "%text"){ - let textContents = tree[1]; + var textContents = splitText(tree[1]); if (Array.isArray(textContents)){ + textContents = textContents.flat().filter((x)=>{return x !== ""}); let decoratedArray = textContents .flatMap(x=>String(x)) + .map(x=>x.replace("\'", "\\\'")) .map(x=>x.replace("\`","\\\`")); return "[`" + decoratedArray.join("\`, \`") + "`]"; }else{ - let decorated = textContents.replace("\`","\\\`"); + let decorated = textContents.replace("\`","\\\`").replace("\'", "\\\'"); return "[`" + decorated + "`]"; }