@liascript/editor 1.0.4--0.9.48 → 1.1.0--0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -23,7 +23,7 @@ install via npm:
23
23
  `npm i @liascript/editor`
24
24
 
25
25
  > **Note:** The version information might look a bit different e.g.
26
- > `1.0.4--0.9.48`. The second version mirrors current version of LiaScript,
26
+ > `1.1.0--0.10.0`. The second version mirrors current version of LiaScript,
27
27
  > while the first number is referring to the changes of the editor-branch.
28
28
 
29
29
  ## HowTo
@@ -68,14 +68,14 @@ let line = editor_.getCursorBufferPosition().row + 1
68
68
  webview.contentWindow.postMessage({ cmd: 'goto', param: line })
69
69
 
70
70
  // 3.2
71
- webview.contentWindow.gotoLia(line)
71
+ webview.contentWindow.LIA.goto(line)
72
72
  ```
73
73
 
74
74
  The other way around works similar, you will have to overwrite internally
75
75
  exposed global function `liaGoto` and move your cursor to the provided line:
76
76
 
77
77
  ```javascript
78
- webview.contentWindow.liaGoto = function (line) {
78
+ webview.contentWindow.LIA.goto = function (line) {
79
79
  editor.setCursor({ line: line, ch: 0 })
80
80
  editor.focus()
81
81
  }
@@ -0,0 +1 @@
1
+ function e(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}var t=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).parcelRequirea18f;t.register("jb3QJ",(function(n,r){e(n.exports,"Connector",(function(){return i}));var o=t("2lmGf"),s=t("4tn47");class i{hasIndex(){return!1}storage(){return new o.LiaStorage}initSettings(e,t=!1){return s.Settings.init(e,t)}setSettings(e){localStorage.setItem(s.Settings.PORT,JSON.stringify(e))}getSettings(){const e=localStorage.getItem(s.Settings.PORT);let t=null;if("string"==typeof e){try{t=JSON.parse(e)}catch(e){console.warn("getSettings =>",e)}t||(t=s.Settings.default),window.innerWidth<=768&&(t.table_of_contents=!1)}return t}open(e,t,n){}load(e){}store(e){}update(e,t){}slide(e){}getIndex(){}deleteFromIndex(e){}storeToIndex(e){}restoreFromIndex(e,t){}reset(e,t){this.initSettings(null,!0)}getFromIndex(e){return null}constructor(){}}})),t.register("2lmGf",(function(t,n){e(t.exports,"LiaStorage",(function(){return r}));class r{getItems(e=[]){"string"==typeof e&&(e=[e]);let t={};for(let n=0;n<e.length;n++){let r=localStorage.getItem(e[n]);t[e[n]]=r?JSON.parse(r):r}return t}setItems(e){this._setLocal(e)}_setLocal(e){if("object"==typeof e)for(const[t,n]of Object.entries(e))localStorage.setItem(t,JSON.stringify(n))}constructor(){}}}));