diff --git a/ExtensionSchema.json b/ExtensionSchema.json deleted file mode 100644 index e69de29bb..000000000 diff --git a/Featured.json b/Featured.json deleted file mode 100644 index 398368d96..000000000 --- a/Featured.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Featured" : "ChatGPT" -} \ No newline at end of file diff --git a/Index.json b/Index.json deleted file mode 100644 index 656df5fe5..000000000 --- a/Index.json +++ /dev/null @@ -1,319 +0,0 @@ -[ - { - "Members": [ - "PasteAndMatch", - "PasteAndEnter", - "Delete", - "SelectAll", - "Highlight" - ], - "Title": "Text Editing" - }, - { - "Members": [ - "Formatting", - "Uppercase", - "Lowercase", - "Capitalize", - "TitleCase", - "SentenceCase", - "Quotes", - "Brackets", - "Hyphenate", - "Underscore", - "RemoveSpaces", - "JoinLines", - "Slugify", - "AlternatingCase", - "FullHalfWidth", - "ROT13" - ], - "Title": "Text Transformation" - }, - { - "Members": [ - "ChatGPT" - ], - "Title": "AI Tools" - }, - { - "Members": [ - "Markdown", - "CopyAsMarkdown", - "MarkdownToRTF" - ], - "Title": "Markdown" - }, - { - "Members": [ - "CharCount", - "WordCount", - "LineCount" - ], - "Title": "Text Statistics" - }, - { - "Members": [ - "CommaList", - "Sort", - "Reverse", - "Shuffle" - ], - "Title": "Text Lists" - }, - { - "Members": [ - "LargeType", - "Print" - ], - "Title": "Text Display" - }, - { - "Members": [ - "Say" - ], - "Title": "Text-to-speech" - }, - { - "Members": [ - "InstantTranslate", - "GoogleTranslate", - "BingTranslator", - "DeepLTranslator", - "BubbleTranslate3", - "MateTranslate", - "Translatium", - "TranslateTab", - "Reverso", - "Glosbe", - "Pinyin" - ], - "Title": "Translation" - }, - { - "Members": [ - "Notes", - "Bear", - "Curiota", - "DEVONthink3", - "Drafts", - "EagleFiler", - "Evernote", - "MakeSticky", - "NoteAway", - "Notefile", - "NotesTab", - "Notion", - "nvALT", - "OneNote", - "Paper", - "SideNotes", - "Tot", - "Yojimbo" - ], - "Title": "Notes Apps" - }, - { - "Members": [ - "Scrivener", - "Ulysses" - ], - "Title": "Writing Apps" - }, - { - "Members": [ - "Reminders", - "2Do", - "Doit", - "Due", - "OmniFocus", - "TaskPaper", - "TheHitList", - "Things3", - "TickTick", - "Todo", - "Todoist" - ], - "Title": "To-Do Apps" - }, - { - "Members": [ - "Fantastical2", - "Fantastical3", - "BusyCal" - ], - "Title": "Calendar Apps" - }, - { - "Members": [ - "Cardhop", - "BusyContacts" - ], - "Title": "Contacts Apps" - }, - { - "Members": [ - "Unclutter", - "Yoink", - "Dropshelf" - ], - "Title": "Drag & Drop Utilities" - }, - { - "Members": [ - "Alfred", - "LaunchBar", - "Quicksilver" - ], - "Title": "Launcher Utilities" - }, - { - "Members": [ - "TextEdit", - "Email", - "Messages", - "Maps", - "Leap", - "HoudahSpot", - "Tembo", - "Typinator", - "TextSoap", - "Parcel", - "Deliveries", - "Slack", - "DayOne", - "FindAnyFile" - ], - "Title": "Other Apps" - }, - { - "Members": [ - "Baidu", - "Bing", - "DuckDuckGo", - "Ecosia", - "GoogleSearch", - "Kagi", - "Naver", - "StartPage", - "YahooJapanSearch", - "YahooSearch", - "Yandex" - ], - "Title": "Web Search" - }, - { - "Members": [ - "Wikipedia", - "GoogleImages", - "GoogleMaps", - "GoogleScholar", - "TwitterSearch", - "Amazon", - "Audible", - "CamelCamelCamel", - "Ebay", - "Etsy", - "IMDb", - "RottenTomatoes", - "Goodreads", - "YouTube", - "DOI", - "PubMed", - "WorldCat", - "UrbanDictionary", - "WolframAlpha", - "Douban", - "Taobao", - "JD" - ], - "Title": "Other Searches" - }, - { - "Members": [ - "Buffer", - "LinkedIn" - ], - "Title": "Social Networking" - }, - { - "Members": [ - "Music", - "iTunesMusic", - "Spotify", - "Discogs" - ], - "Title": "Music" - }, - { - "Members": [ - "ShortenLink", - "Bitly", - "Droplr", - "ShortMenu" - ], - "Title": "Link Shortening" - }, - { - "Members": [ - "OpenInBrowser", - "ReadingList", - "Pocket", - "Pinboard", - "Readwise", - "RaindropIO", - "Leech", - "Downie", - "GetIP" - ], - "Title": "Work with URLs" - }, - { - "Members": [ - "Call", - "Skype", - "PhoneAmego" - ], - "Title": "Phone Numbers" - }, - { - "Members": [ - "OnlineDictionary", - "OnlineThesaurus", - "Antidote", - "Eudic" - ], - "Title": "Dictionaries" - }, - { - "Members": [ - "Base64", - "BBEdit", - "BundleID", - "CodeCase", - "Dash", - "HTMLEncode", - "Quiver", - "RunCommand", - "SnippetsLab", - "UnixTime", - "URLEncode" - ], - "Title": "For Developers" - }, - { - "Members": [ - "Calculate", - "Convert", - "Timestamp" - ], - "Title": "Useful Tools" - }, - { - "Members": [ - "Append", - "Swap" - ], - "Title": "Clipboard Tools" - } -] diff --git a/README-js.md b/README-js.md deleted file mode 100644 index 85f18cd00..000000000 --- a/README-js.md +++ /dev/null @@ -1,5 +0,0 @@ -This documentation describes the API available to PopClip's JavaScript actions and module-based extensions. - -It is auto-generated from the TypeScript definitions file, popclip.d.ts. - -A good starting point is the [PopClip](./interfaces/PopClip.html) object. diff --git a/README.md b/README.md index a23983cd3..0f81badd4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ + + > [!IMPORTANT] > **Developer documentation has moved! See for the latest docs.** @@ -33,8 +35,7 @@ Bugfixes ~~and new extension submissions~~ are welcome via pull request. Please - ~~Submitting an extension does not guarantee publication on the website.~~ - ~~I may make changes to any extension submitted.~~ ----- +--- > [!IMPORTANT] > **Developer documentation has moved! See for the latest docs.** - diff --git a/bin/build-docs b/bin/build-docs deleted file mode 100755 index ec78752ef..000000000 --- a/bin/build-docs +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/zsh -# Outputs JavaScript API documentation to jsdocs/ as per tsconfig.json -# supply --watch as parameter 1 to use live mode -npx typedoc $1 && open ./docs/index.html diff --git a/docs-assets/ExampleConfig.plist b/docs-assets/ExampleConfig.plist deleted file mode 100644 index 5ada7ece7..000000000 --- a/docs-assets/ExampleConfig.plist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Actions - - - Image File - example.png - Shell Script File - example.sh - Title - Example - - - Extension Identifier - com.pilotmoon.popclip.extension.example - Extension Name - Example - Required Software Version - 1459 - - diff --git a/docs-assets/construction.gif b/docs-assets/construction.gif deleted file mode 100644 index e04232ef9..000000000 Binary files a/docs-assets/construction.gif and /dev/null differ diff --git a/docs-assets/example.png b/docs-assets/example.png deleted file mode 100644 index 78ba396fb..000000000 Binary files a/docs-assets/example.png and /dev/null differ diff --git a/docs-assets/ext_warning.png b/docs-assets/ext_warning.png deleted file mode 100644 index 2785fda41..000000000 Binary files a/docs-assets/ext_warning.png and /dev/null differ diff --git a/docs-assets/iconpreview.gif b/docs-assets/iconpreview.gif deleted file mode 100644 index 9270f6204..000000000 Binary files a/docs-assets/iconpreview.gif and /dev/null differ diff --git a/docs-assets/names.png b/docs-assets/names.png deleted file mode 100644 index 9772b8136..000000000 Binary files a/docs-assets/names.png and /dev/null differ diff --git a/docs-assets/sayplist.png b/docs-assets/sayplist.png deleted file mode 100644 index 0705abcbe..000000000 Binary files a/docs-assets/sayplist.png and /dev/null differ diff --git a/docs-assets/texticons/A.png b/docs-assets/texticons/A.png deleted file mode 100644 index 81cf6c72a..000000000 Binary files a/docs-assets/texticons/A.png and /dev/null differ diff --git a/docs-assets/texticons/circle_1.png b/docs-assets/texticons/circle_1.png deleted file mode 100644 index 730d13da8..000000000 Binary files a/docs-assets/texticons/circle_1.png and /dev/null differ diff --git "a/docs-assets/texticons/circle_filled_\346\234\254.png" "b/docs-assets/texticons/circle_filled_\346\234\254.png" deleted file mode 100644 index aa4afb478..000000000 Binary files "a/docs-assets/texticons/circle_filled_\346\234\254.png" and /dev/null differ diff --git a/docs-assets/texticons/search_E.png b/docs-assets/texticons/search_E.png deleted file mode 100644 index de247a737..000000000 Binary files a/docs-assets/texticons/search_E.png and /dev/null differ diff --git "a/docs-assets/texticons/search_filled_monospaced_\302\243.png" "b/docs-assets/texticons/search_filled_monospaced_\302\243.png" deleted file mode 100644 index 611dcc891..000000000 Binary files "a/docs-assets/texticons/search_filled_monospaced_\302\243.png" and /dev/null differ diff --git a/docs-assets/texticons/square_filled_!.png b/docs-assets/texticons/square_filled_!.png deleted file mode 100644 index b793fe7f6..000000000 Binary files a/docs-assets/texticons/square_filled_!.png and /dev/null differ diff --git a/docs-assets/texticons/square_filled_monospaced_().png b/docs-assets/texticons/square_filled_monospaced_().png deleted file mode 100644 index 7b5541009..000000000 Binary files a/docs-assets/texticons/square_filled_monospaced_().png and /dev/null differ diff --git a/docs-assets/texticons/square_xyz.png b/docs-assets/texticons/square_xyz.png deleted file mode 100644 index 8774bd46d..000000000 Binary files a/docs-assets/texticons/square_xyz.png and /dev/null differ diff --git a/docs-assets/texticons/symbol-flame.png b/docs-assets/texticons/symbol-flame.png deleted file mode 100644 index b281cb763..000000000 Binary files a/docs-assets/texticons/symbol-flame.png and /dev/null differ diff --git a/docs-assets/texticons/symbol-hand.raised.png b/docs-assets/texticons/symbol-hand.raised.png deleted file mode 100644 index 9ecadd35c..000000000 Binary files a/docs-assets/texticons/symbol-hand.raised.png and /dev/null differ diff --git a/docs-assets/texticons/symbol-signpost.right.png b/docs-assets/texticons/symbol-signpost.right.png deleted file mode 100644 index e9d4dc6ed..000000000 Binary files a/docs-assets/texticons/symbol-signpost.right.png and /dev/null differ diff --git a/docs-assets/ttplist.png b/docs-assets/ttplist.png deleted file mode 100644 index 74f4d8865..000000000 Binary files a/docs-assets/ttplist.png and /dev/null differ diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e2ac6616a..000000000 --- a/docs/.nojekyll +++ /dev/null @@ -1 +0,0 @@ -TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css deleted file mode 100644 index 42306edf0..000000000 --- a/docs/assets/highlight.css +++ /dev/null @@ -1,99 +0,0 @@ -:root { - --light-hl-0: #001080; - --dark-hl-0: #9CDCFE; - --light-hl-1: #000000; - --dark-hl-1: #D4D4D4; - --light-hl-2: #811F3F; - --dark-hl-2: #D16969; - --light-hl-3: #0000FF; - --dark-hl-3: #569CD6; - --light-hl-4: #008000; - --dark-hl-4: #6A9955; - --light-hl-5: #098658; - --dark-hl-5: #B5CEA8; - --light-hl-6: #A31515; - --dark-hl-6: #CE9178; - --light-hl-7: #795E26; - --dark-hl-7: #DCDCAA; - --light-hl-8: #000000FF; - --dark-hl-8: #D4D4D4; - --light-hl-9: #0070C1; - --dark-hl-9: #4FC1FF; - --light-hl-10: #EE0000; - --dark-hl-10: #D7BA7D; - --light-code-background: #FFFFFF; - --dark-code-background: #1E1E1E; -} - -@media (prefers-color-scheme: light) { :root { - --hl-0: var(--light-hl-0); - --hl-1: var(--light-hl-1); - --hl-2: var(--light-hl-2); - --hl-3: var(--light-hl-3); - --hl-4: var(--light-hl-4); - --hl-5: var(--light-hl-5); - --hl-6: var(--light-hl-6); - --hl-7: var(--light-hl-7); - --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); - --hl-10: var(--light-hl-10); - --code-background: var(--light-code-background); -} } - -@media (prefers-color-scheme: dark) { :root { - --hl-0: var(--dark-hl-0); - --hl-1: var(--dark-hl-1); - --hl-2: var(--dark-hl-2); - --hl-3: var(--dark-hl-3); - --hl-4: var(--dark-hl-4); - --hl-5: var(--dark-hl-5); - --hl-6: var(--dark-hl-6); - --hl-7: var(--dark-hl-7); - --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); - --hl-10: var(--dark-hl-10); - --code-background: var(--dark-code-background); -} } - -:root[data-theme='light'] { - --hl-0: var(--light-hl-0); - --hl-1: var(--light-hl-1); - --hl-2: var(--light-hl-2); - --hl-3: var(--light-hl-3); - --hl-4: var(--light-hl-4); - --hl-5: var(--light-hl-5); - --hl-6: var(--light-hl-6); - --hl-7: var(--light-hl-7); - --hl-8: var(--light-hl-8); - --hl-9: var(--light-hl-9); - --hl-10: var(--light-hl-10); - --code-background: var(--light-code-background); -} - -:root[data-theme='dark'] { - --hl-0: var(--dark-hl-0); - --hl-1: var(--dark-hl-1); - --hl-2: var(--dark-hl-2); - --hl-3: var(--dark-hl-3); - --hl-4: var(--dark-hl-4); - --hl-5: var(--dark-hl-5); - --hl-6: var(--dark-hl-6); - --hl-7: var(--dark-hl-7); - --hl-8: var(--dark-hl-8); - --hl-9: var(--dark-hl-9); - --hl-10: var(--dark-hl-10); - --code-background: var(--dark-code-background); -} - -.hl-0 { color: var(--hl-0); } -.hl-1 { color: var(--hl-1); } -.hl-2 { color: var(--hl-2); } -.hl-3 { color: var(--hl-3); } -.hl-4 { color: var(--hl-4); } -.hl-5 { color: var(--hl-5); } -.hl-6 { color: var(--hl-6); } -.hl-7 { color: var(--hl-7); } -.hl-8 { color: var(--hl-8); } -.hl-9 { color: var(--hl-9); } -.hl-10 { color: var(--hl-10); } -pre, code { background: var(--code-background); } diff --git a/docs/assets/main.js b/docs/assets/main.js deleted file mode 100644 index 01bcad55f..000000000 --- a/docs/assets/main.js +++ /dev/null @@ -1,59 +0,0 @@ -"use strict"; -"use strict";(()=>{var Pe=Object.create;var ne=Object.defineProperty;var Ie=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Fe=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!Re.call(t,i)&&i!==n&&ne(t,i,{get:()=>e[i],enumerable:!(r=Ie(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Pe(_e(t)):{},Fe(e||!t||!t.__esModule?ne(n,"default",{value:t,enumerable:!0}):n,t));var ae=Me((se,oe)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i0){var d=t.utils.clone(n)||{};d.position=[a,u],d.index=s.length,s.push(new t.Token(r.slice(a,o),d))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,n){n in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. -`,e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(r){var i=t.Pipeline.registeredFunctions[r];if(i)n.add(i);else throw new Error("Cannot load unregistered function: "+r)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(n){t.Pipeline.warnIfFunctionNotRegistered(n),this._stack.push(n)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");r=r+1,this._stack.splice(r,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var r=this._stack.indexOf(e);if(r==-1)throw new Error("Cannot find existingFn");this._stack.splice(r,0,n)},t.Pipeline.prototype.remove=function(e){var n=this._stack.indexOf(e);n!=-1&&this._stack.splice(n,1)},t.Pipeline.prototype.run=function(e){for(var n=this._stack.length,r=0;r1&&(oe&&(r=s),o!=e);)i=r-n,s=n+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ol?d+=2:a==l&&(n+=r[u+1]*i[d+1],u+=2,d+=2);return n},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),n=1,r=0;n0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}if(s.str.length==0&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}s.str.length==1&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var d=s.str.charAt(0),v=s.str.charAt(1),f;v in s.node.edges?f=s.node.edges[v]:(f=new t.TokenSet,s.node.edges[v]=f),s.str.length==1&&(f.final=!0),i.push({node:f,editsRemaining:s.editsRemaining-1,str:d+s.str.slice(2)})}}}return r},t.TokenSet.fromString=function(e){for(var n=new t.TokenSet,r=n,i=0,s=e.length;i=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,n){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=n||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,n;do e=this.next(),n=e.charCodeAt(0);while(n>47&&n<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var n=e.next();if(n==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(n.charCodeAt(0)==92){e.escapeCharacter();continue}if(n==":")return t.QueryLexer.lexField;if(n=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(n=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(n=="+"&&e.width()===1||n=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(n.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,n){this.lexer=new t.QueryLexer(e),this.query=n,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var n=e.peekLexeme();if(n!=null)switch(n.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+n.type;throw n.str.length>=1&&(r+=" with value '"+n.str+"'"),new t.QueryParseError(r,n.start,n.end)}},t.QueryParser.parsePresence=function(e){var n=e.consumeLexeme();if(n!=null){switch(n.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+n.str+"'";throw new t.QueryParseError(r,n.start,n.end)}var i=e.peekLexeme();if(i==null){var r="expecting term or field, found nothing";throw new t.QueryParseError(r,n.start,n.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var r="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(r,i.start,i.end)}}},t.QueryParser.parseField=function(e){var n=e.consumeLexeme();if(n!=null){if(e.query.allFields.indexOf(n.str)==-1){var r=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+n.str+"', possible fields: "+r;throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.fields=[n.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,n.start,n.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var n=e.consumeLexeme();if(n!=null){e.currentClause.term=n.str.toLowerCase(),n.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(r==null){e.nextClause();return}switch(r.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new t.QueryParseError(i,r.start,r.end)}}},t.QueryParser.parseEditDistance=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.editDistance=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var n=e.consumeLexeme();if(n!=null){var r=parseInt(n.str,10);if(isNaN(r)){var i="boost must be numeric";throw new t.QueryParseError(i,n.start,n.end)}e.currentClause.boost=r;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,n){typeof define=="function"&&define.amd?define(n):typeof se=="object"?oe.exports=n():e.lunr=n()}(this,function(){return t})})()});var re=[];function G(t,e){re.push({selector:e,constructor:t})}var U=class{constructor(){this.alwaysVisibleMember=null;this.createComponents(document.body),this.ensureActivePageVisible(),this.ensureFocusedElementVisible(),this.listenForCodeCopies(),window.addEventListener("hashchange",()=>this.ensureFocusedElementVisible())}createComponents(e){re.forEach(n=>{e.querySelectorAll(n.selector).forEach(r=>{r.dataset.hasInstance||(new n.constructor({el:r,app:this}),r.dataset.hasInstance=String(!0))})})}filterChanged(){this.ensureFocusedElementVisible()}ensureActivePageVisible(){let e=document.querySelector(".tsd-navigation .current"),n=e?.parentElement;for(;n&&!n.classList.contains(".tsd-navigation");)n instanceof HTMLDetailsElement&&(n.open=!0),n=n.parentElement;if(e){let r=e.getBoundingClientRect().top-document.documentElement.clientHeight/4;document.querySelector(".site-menu").scrollTop=r}}ensureFocusedElementVisible(){if(this.alwaysVisibleMember&&(this.alwaysVisibleMember.classList.remove("always-visible"),this.alwaysVisibleMember.firstElementChild.remove(),this.alwaysVisibleMember=null),!location.hash)return;let e=document.getElementById(location.hash.substring(1));if(!e)return;let n=e.parentElement;for(;n&&n.tagName!=="SECTION";)n=n.parentElement;if(n&&n.offsetParent==null){this.alwaysVisibleMember=n,n.classList.add("always-visible");let r=document.createElement("p");r.classList.add("warning"),r.textContent="This member is normally hidden due to your filter settings.",n.prepend(r)}}listenForCodeCopies(){document.querySelectorAll("pre > button").forEach(e=>{let n;e.addEventListener("click",()=>{e.previousElementSibling instanceof HTMLElement&&navigator.clipboard.writeText(e.previousElementSibling.innerText.trim()),e.textContent="Copied!",e.classList.add("visible"),clearTimeout(n),n=setTimeout(()=>{e.classList.remove("visible"),n=setTimeout(()=>{e.textContent="Copy"},100)},1e3)})})}};var ie=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var de=De(ae());async function le(t,e){if(!window.searchData)return;let n=await fetch(window.searchData),r=new Blob([await n.arrayBuffer()]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();t.data=i,t.index=de.Index.load(i.index),e.classList.remove("loading"),e.classList.add("ready")}function he(){let t=document.getElementById("tsd-search");if(!t)return;let e={base:t.dataset.base+"/"},n=document.getElementById("tsd-search-script");t.classList.add("loading"),n&&(n.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),n.addEventListener("load",()=>{le(e,t)}),le(e,t));let r=document.querySelector("#tsd-search input"),i=document.querySelector("#tsd-search .results");if(!r||!i)throw new Error("The input field or the result list wrapper was not found");let s=!1;i.addEventListener("mousedown",()=>s=!0),i.addEventListener("mouseup",()=>{s=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{s||(s=!1,t.classList.remove("has-focus"))}),Ae(t,i,r,e)}function Ae(t,e,n,r){n.addEventListener("input",ie(()=>{Ne(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?ue(e,-1):s.key==="ArrowDown"?ue(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ne(t,e,n,r){if(!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;oa.score-o.score);for(let o=0,a=Math.min(10,s.length);o`,d=ce(l.name,i);globalThis.DEBUG_SEARCH_WEIGHTS&&(d+=` (score: ${s[o].score.toFixed(2)})`),l.parent&&(d=` - ${ce(l.parent,i)}.${d}`);let v=document.createElement("li");v.classList.value=l.classes??"";let f=document.createElement("a");f.href=r.base+l.url,f.innerHTML=u+d,v.append(f),e.appendChild(v)}}function ue(t,e){let n=t.querySelector(".current");if(!n)n=t.querySelector(e==1?"li:first-child":"li:last-child"),n&&n.classList.add("current");else{let r=n;if(e===1)do r=r.nextElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);else do r=r.previousElementSibling??void 0;while(r instanceof HTMLElement&&r.offsetParent==null);r&&(n.classList.remove("current"),r.classList.add("current"))}}function Ve(t,e){let n=t.querySelector(".current");if(n||(n=t.querySelector("li:first-child")),n){let r=n.querySelector("a");r&&(window.location.href=r.href),e.blur()}}function ce(t,e){if(e==="")return t;let n=t.toLocaleLowerCase(),r=e.toLocaleLowerCase(),i=[],s=0,o=n.indexOf(r);for(;o!=-1;)i.push(K(t.substring(s,o)),`${K(t.substring(o,o+r.length))}`),s=o+r.length,o=n.indexOf(r,s);return i.push(K(t.substring(s))),i.join("")}var Be={"&":"&","<":"<",">":">","'":"'",'"':"""};function K(t){return t.replace(/[&<>"'"]/g,e=>Be[e])}var C=class{constructor(e){this.el=e.el,this.app=e.app}};var F="mousedown",pe="mousemove",B="mouseup",J={x:0,y:0},fe=!1,ee=!1,He=!1,D=!1,me=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(me?"is-mobile":"not-mobile");me&&"ontouchstart"in document.documentElement&&(He=!0,F="touchstart",pe="touchmove",B="touchend");document.addEventListener(F,t=>{ee=!0,D=!1;let e=F=="touchstart"?t.targetTouches[0]:t;J.y=e.pageY||0,J.x=e.pageX||0});document.addEventListener(pe,t=>{if(ee&&!D){let e=F=="touchstart"?t.targetTouches[0]:t,n=J.x-(e.pageX||0),r=J.y-(e.pageY||0);D=Math.sqrt(n*n+r*r)>10}});document.addEventListener(B,()=>{ee=!1});document.addEventListener("click",t=>{fe&&(t.preventDefault(),t.stopImmediatePropagation(),fe=!1)});var X=class extends C{constructor(n){super(n);this.className=this.el.dataset.toggle||"",this.el.addEventListener(B,r=>this.onPointerUp(r)),this.el.addEventListener("click",r=>r.preventDefault()),document.addEventListener(F,r=>this.onDocumentPointerDown(r)),document.addEventListener(B,r=>this.onDocumentPointerUp(r))}setActive(n){if(this.active==n)return;this.active=n,document.documentElement.classList.toggle("has-"+this.className,n),this.el.classList.toggle("active",n);let r=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(r),setTimeout(()=>document.documentElement.classList.remove(r),500)}onPointerUp(n){D||(this.setActive(!0),n.preventDefault())}onDocumentPointerDown(n){if(this.active){if(n.target.closest(".col-sidebar, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(n){if(!D&&this.active&&n.target.closest(".col-sidebar")){let r=n.target.closest("a");if(r){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substring(0,i.indexOf("#"))),r.href.substring(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te;try{te=localStorage}catch{te={getItem(){return null},setItem(){}}}var Q=te;var ve=document.head.appendChild(document.createElement("style"));ve.dataset.for="filters";var Y=class extends C{constructor(n){super(n);this.key=`filter-${this.el.name}`,this.value=this.el.checked,this.el.addEventListener("change",()=>{this.setLocalStorage(this.el.checked)}),this.setLocalStorage(this.fromLocalStorage()),ve.innerHTML+=`html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; } -`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var Z=class extends C{constructor(n){super(n);this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.dataset.key??this.summary.textContent.trim().replace(/\s+/g,"-").toLowerCase()}`;let r=Q.getItem(this.key);this.el.open=r?r==="true":this.el.open,this.el.addEventListener("toggle",()=>this.update());let i=this.summary.querySelector("a");i&&i.addEventListener("click",()=>{location.assign(i.href)}),this.update()}update(){this.icon.style.transform=`rotate(${this.el.open?0:-90}deg)`,Q.setItem(this.key,this.el.open.toString())}};function ge(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,ye(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),ye(t.value)})}function ye(t){document.documentElement.dataset.theme=t}var Le;function be(){let t=document.getElementById("tsd-nav-script");t&&(t.addEventListener("load",xe),xe())}async function xe(){let t=document.getElementById("tsd-nav-container");if(!t||!window.navigationData)return;let n=await(await fetch(window.navigationData)).arrayBuffer(),r=new Blob([n]).stream().pipeThrough(new DecompressionStream("gzip")),i=await new Response(r).json();Le=t.dataset.base+"/",t.innerHTML="";for(let s of i)we(s,t,[]);window.app.createComponents(t),window.app.ensureActivePageVisible()}function we(t,e,n){let r=e.appendChild(document.createElement("li"));if(t.children){let i=[...n,t.text],s=r.appendChild(document.createElement("details"));s.className=t.class?`${t.class} tsd-index-accordion`:"tsd-index-accordion",s.dataset.key=i.join("$");let o=s.appendChild(document.createElement("summary"));o.className="tsd-accordion-summary",o.innerHTML='',Ee(t,o);let a=s.appendChild(document.createElement("div"));a.className="tsd-accordion-details";let l=a.appendChild(document.createElement("ul"));l.className="tsd-nested-navigation";for(let u of t.children)we(u,l,i)}else Ee(t,r,t.class)}function Ee(t,e,n){if(t.path){let r=e.appendChild(document.createElement("a"));r.href=Le+t.path,n&&(r.className=n),location.href===r.href&&r.classList.add("current"),t.kind&&(r.innerHTML=``),r.appendChild(document.createElement("span")).textContent=t.text}else e.appendChild(document.createElement("span")).textContent=t.text}G(X,"a[data-toggle]");G(Z,".tsd-index-accordion");G(Y,".tsd-filter-item input[type=checkbox]");var Se=document.getElementById("tsd-theme");Se&&ge(Se);var je=new U;Object.defineProperty(window,"app",{value:je});he();be();})(); -/*! Bundled license information: - -lunr/lunr.js: - (** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 - * Copyright (C) 2020 Oliver Nightingale - * @license MIT - *) - (*! - * lunr.utils - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.Set - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.tokenizer - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.Pipeline - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.Vector - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.stemmer - * Copyright (C) 2020 Oliver Nightingale - * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt - *) - (*! - * lunr.stopWordFilter - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.trimmer - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.TokenSet - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.Index - * Copyright (C) 2020 Oliver Nightingale - *) - (*! - * lunr.Builder - * Copyright (C) 2020 Oliver Nightingale - *) -*/ diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js deleted file mode 100644 index 3e9c04c26..000000000 --- a/docs/assets/navigation.js +++ /dev/null @@ -1 +0,0 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAE5WVSU/DMBCF/0vOQGmhZblBRaVKLFWBE+JgkklrYWxjO6ziv5OtzTYZw63t9+b1jWecPHwHDj5ccBqchY4rGewEmrl1+p1LByZmIdhBgfbW7kWk/JnLKDgdjSc/O63iWSJbJu5Tb+s3tOWzf3I0HI86XgujNBjHwRKRKhEZLk7Lbh3oTq4N8EayVoWcOYjOtMbz1BVkmMStZ0K9955Vi3ujZXrK6x8+cxkrvLsS+hq70dlf9Uys4pTNOcTKADativh6mSqZf8JilIyKcPHhQNq+y7CllMU89G5wU0KaSZ3gzeSEKr1UIRP8iz2J9OAMl6v2oXYEvrO9UhGPORi8qS2lQl3DKrsoS3hNuIEXkK6dqqvwxSo2C81UICoQtbZ/WNkFsw4oj7rAa/SkmIn6bXL8N5N81SW+OR0Vaan0VHD8wVcyT3kiGPWC6Cp8814yuQI0UE6oOLkgKrYdn1dDQVr1r/A/dnfJw3X7doaCWZvZbFnTZTg6rjkUirvsFqMN1TjVzr3jAq3PAFUYQcwlIM/NuBynHbQkTbfJYc1MI7fgjRmepbeDiu4OmyYH9TPVSoeNla05FIguT8/LYW3kgAhvirFjpSUiiq2A+muvKs0BUZg0Ble1mv2O9Pn4C7Eyt6D2CQAA" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js deleted file mode 100644 index 629ac94fe..000000000 --- a/docs/assets/search.js +++ /dev/null @@ -1 +0,0 @@ -window.searchData = "data:application/octet-stream;base64,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"; \ No newline at end of file diff --git a/docs/assets/style.css b/docs/assets/style.css deleted file mode 100644 index 108428c3f..000000000 --- a/docs/assets/style.css +++ /dev/null @@ -1,1383 +0,0 @@ -:root { - /* Light */ - --light-color-background: #f2f4f8; - --light-color-background-secondary: #eff0f1; - --light-color-warning-text: #222; - --light-color-background-warning: #e6e600; - --light-color-icon-background: var(--light-color-background); - --light-color-accent: #c5c7c9; - --light-color-active-menu-item: var(--light-color-accent); - --light-color-text: #222; - --light-color-text-aside: #6e6e6e; - --light-color-link: #1f70c2; - - --light-color-ts-project: #b111c9; - --light-color-ts-module: var(--light-color-ts-project); - --light-color-ts-namespace: var(--light-color-ts-project); - --light-color-ts-enum: #7e6f15; - --light-color-ts-enum-member: var(--light-color-ts-enum); - --light-color-ts-variable: #4760ec; - --light-color-ts-function: #572be7; - --light-color-ts-class: #1f70c2; - --light-color-ts-interface: #108024; - --light-color-ts-constructor: var(--light-color-ts-class); - --light-color-ts-property: var(--light-color-ts-variable); - --light-color-ts-method: var(--light-color-ts-function); - --light-color-ts-call-signature: var(--light-color-ts-method); - --light-color-ts-index-signature: var(--light-color-ts-property); - --light-color-ts-constructor-signature: var(--light-color-ts-constructor); - --light-color-ts-parameter: var(--light-color-ts-variable); - /* type literal not included as links will never be generated to it */ - --light-color-ts-type-parameter: var(--light-color-ts-type-alias); - --light-color-ts-accessor: var(--light-color-ts-property); - --light-color-ts-get-signature: var(--light-color-ts-accessor); - --light-color-ts-set-signature: var(--light-color-ts-accessor); - --light-color-ts-type-alias: #d51270; - /* reference not included as links will be colored with the kind that it points to */ - - --light-external-icon: url("data:image/svg+xml;utf8,"); - --light-color-scheme: light; - - /* Dark */ - --dark-color-background: #2b2e33; - --dark-color-background-secondary: #1e2024; - --dark-color-background-warning: #bebe00; - --dark-color-warning-text: #222; - --dark-color-icon-background: var(--dark-color-background-secondary); - --dark-color-accent: #9096a2; - --dark-color-active-menu-item: #5d5d6a; - --dark-color-text: #f5f5f5; - --dark-color-text-aside: #dddddd; - --dark-color-link: #00aff4; - - --dark-color-ts-project: #e358ff; - --dark-color-ts-module: var(--dark-color-ts-project); - --dark-color-ts-namespace: var(--dark-color-ts-project); - --dark-color-ts-enum: #f4d93e; - --dark-color-ts-enum-member: var(--dark-color-ts-enum); - --dark-color-ts-variable: #798dff; - --dark-color-ts-function: #a280ff; - --dark-color-ts-class: #8ac4ff; - --dark-color-ts-interface: #6cff87; - --dark-color-ts-constructor: var(--dark-color-ts-class); - --dark-color-ts-property: var(--dark-color-ts-variable); - --dark-color-ts-method: var(--dark-color-ts-function); - --dark-color-ts-call-signature: var(--dark-color-ts-method); - --dark-color-ts-index-signature: var(--dark-color-ts-property); - --dark-color-ts-constructor-signature: var(--dark-color-ts-constructor); - --dark-color-ts-parameter: var(--dark-color-ts-variable); - /* type literal not included as links will never be generated to it */ - --dark-color-ts-type-parameter: var(--dark-color-ts-type-alias); - --dark-color-ts-accessor: var(--dark-color-ts-property); - --dark-color-ts-get-signature: var(--dark-color-ts-accessor); - --dark-color-ts-set-signature: var(--dark-color-ts-accessor); - --dark-color-ts-type-alias: #ff6492; - /* reference not included as links will be colored with the kind that it points to */ - - --dark-external-icon: url("data:image/svg+xml;utf8,"); - --dark-color-scheme: dark; -} - -@media (prefers-color-scheme: light) { - :root { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-background-warning: var(--light-color-background-warning); - --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-active-menu-item: var(--light-color-active-menu-item); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - - --color-ts-module: var(--light-color-ts-module); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-enum-member: var(--light-color-ts-enum-member); - --color-ts-variable: var(--light-color-ts-variable); - --color-ts-function: var(--light-color-ts-function); - --color-ts-class: var(--light-color-ts-class); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-constructor: var(--light-color-ts-constructor); - --color-ts-property: var(--light-color-ts-property); - --color-ts-method: var(--light-color-ts-method); - --color-ts-call-signature: var(--light-color-ts-call-signature); - --color-ts-index-signature: var(--light-color-ts-index-signature); - --color-ts-constructor-signature: var( - --light-color-ts-constructor-signature - ); - --color-ts-parameter: var(--light-color-ts-parameter); - --color-ts-type-parameter: var(--light-color-ts-type-parameter); - --color-ts-accessor: var(--light-color-ts-accessor); - --color-ts-get-signature: var(--light-color-ts-get-signature); - --color-ts-set-signature: var(--light-color-ts-set-signature); - --color-ts-type-alias: var(--light-color-ts-type-alias); - - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); - } -} - -@media (prefers-color-scheme: dark) { - :root { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-background-warning: var(--dark-color-background-warning); - --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-active-menu-item: var(--dark-color-active-menu-item); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - - --color-ts-module: var(--dark-color-ts-module); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-enum-member: var(--dark-color-ts-enum-member); - --color-ts-variable: var(--dark-color-ts-variable); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-constructor: var(--dark-color-ts-constructor); - --color-ts-property: var(--dark-color-ts-property); - --color-ts-method: var(--dark-color-ts-method); - --color-ts-call-signature: var(--dark-color-ts-call-signature); - --color-ts-index-signature: var(--dark-color-ts-index-signature); - --color-ts-constructor-signature: var( - --dark-color-ts-constructor-signature - ); - --color-ts-parameter: var(--dark-color-ts-parameter); - --color-ts-type-parameter: var(--dark-color-ts-type-parameter); - --color-ts-accessor: var(--dark-color-ts-accessor); - --color-ts-get-signature: var(--dark-color-ts-get-signature); - --color-ts-set-signature: var(--dark-color-ts-set-signature); - --color-ts-type-alias: var(--dark-color-ts-type-alias); - - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); - } -} - -html { - color-scheme: var(--color-scheme); -} - -body { - margin: 0; -} - -:root[data-theme="light"] { - --color-background: var(--light-color-background); - --color-background-secondary: var(--light-color-background-secondary); - --color-background-warning: var(--light-color-background-warning); - --color-warning-text: var(--light-color-warning-text); - --color-icon-background: var(--light-color-icon-background); - --color-accent: var(--light-color-accent); - --color-active-menu-item: var(--light-color-active-menu-item); - --color-text: var(--light-color-text); - --color-text-aside: var(--light-color-text-aside); - --color-link: var(--light-color-link); - - --color-ts-module: var(--light-color-ts-module); - --color-ts-namespace: var(--light-color-ts-namespace); - --color-ts-enum: var(--light-color-ts-enum); - --color-ts-enum-member: var(--light-color-ts-enum-member); - --color-ts-variable: var(--light-color-ts-variable); - --color-ts-function: var(--light-color-ts-function); - --color-ts-class: var(--light-color-ts-class); - --color-ts-interface: var(--light-color-ts-interface); - --color-ts-constructor: var(--light-color-ts-constructor); - --color-ts-property: var(--light-color-ts-property); - --color-ts-method: var(--light-color-ts-method); - --color-ts-call-signature: var(--light-color-ts-call-signature); - --color-ts-index-signature: var(--light-color-ts-index-signature); - --color-ts-constructor-signature: var( - --light-color-ts-constructor-signature - ); - --color-ts-parameter: var(--light-color-ts-parameter); - --color-ts-type-parameter: var(--light-color-ts-type-parameter); - --color-ts-accessor: var(--light-color-ts-accessor); - --color-ts-get-signature: var(--light-color-ts-get-signature); - --color-ts-set-signature: var(--light-color-ts-set-signature); - --color-ts-type-alias: var(--light-color-ts-type-alias); - - --external-icon: var(--light-external-icon); - --color-scheme: var(--light-color-scheme); -} - -:root[data-theme="dark"] { - --color-background: var(--dark-color-background); - --color-background-secondary: var(--dark-color-background-secondary); - --color-background-warning: var(--dark-color-background-warning); - --color-warning-text: var(--dark-color-warning-text); - --color-icon-background: var(--dark-color-icon-background); - --color-accent: var(--dark-color-accent); - --color-active-menu-item: var(--dark-color-active-menu-item); - --color-text: var(--dark-color-text); - --color-text-aside: var(--dark-color-text-aside); - --color-link: var(--dark-color-link); - - --color-ts-module: var(--dark-color-ts-module); - --color-ts-namespace: var(--dark-color-ts-namespace); - --color-ts-enum: var(--dark-color-ts-enum); - --color-ts-enum-member: var(--dark-color-ts-enum-member); - --color-ts-variable: var(--dark-color-ts-variable); - --color-ts-function: var(--dark-color-ts-function); - --color-ts-class: var(--dark-color-ts-class); - --color-ts-interface: var(--dark-color-ts-interface); - --color-ts-constructor: var(--dark-color-ts-constructor); - --color-ts-property: var(--dark-color-ts-property); - --color-ts-method: var(--dark-color-ts-method); - --color-ts-call-signature: var(--dark-color-ts-call-signature); - --color-ts-index-signature: var(--dark-color-ts-index-signature); - --color-ts-constructor-signature: var( - --dark-color-ts-constructor-signature - ); - --color-ts-parameter: var(--dark-color-ts-parameter); - --color-ts-type-parameter: var(--dark-color-ts-type-parameter); - --color-ts-accessor: var(--dark-color-ts-accessor); - --color-ts-get-signature: var(--dark-color-ts-get-signature); - --color-ts-set-signature: var(--dark-color-ts-set-signature); - --color-ts-type-alias: var(--dark-color-ts-type-alias); - - --external-icon: var(--dark-external-icon); - --color-scheme: var(--dark-color-scheme); -} - -.always-visible, -.always-visible .tsd-signatures { - display: inherit !important; -} - -h1, -h2, -h3, -h4, -h5, -h6 { - line-height: 1.2; -} - -h1 > a, -h2 > a, -h3 > a, -h4 > a, -h5 > a, -h6 > a { - text-decoration: none; - color: var(--color-text); -} - -h1 { - font-size: 1.875rem; - margin: 0.67rem 0; -} - -h2 { - font-size: 1.5rem; - margin: 0.83rem 0; -} - -h3 { - font-size: 1.25rem; - margin: 1rem 0; -} - -h4 { - font-size: 1.05rem; - margin: 1.33rem 0; -} - -h5 { - font-size: 1rem; - margin: 1.5rem 0; -} - -h6 { - font-size: 0.875rem; - margin: 2.33rem 0; -} - -.uppercase { - text-transform: uppercase; -} - -dl, -menu, -ol, -ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -.container { - max-width: 1700px; - padding: 0 2rem; -} - -/* Footer */ -.tsd-generator { - border-top: 1px solid var(--color-accent); - padding-top: 1rem; - padding-bottom: 1rem; - max-height: 3.5rem; -} - -.tsd-generator > p { - margin-top: 0; - margin-bottom: 0; - padding: 0 1rem; -} - -.container-main { - margin: 0 auto; - /* toolbar, footer, margin */ - min-height: calc(100vh - 41px - 56px - 4rem); -} - -@keyframes fade-in { - from { - opacity: 0; - } - to { - opacity: 1; - } -} -@keyframes fade-out { - from { - opacity: 1; - visibility: visible; - } - to { - opacity: 0; - } -} -@keyframes fade-in-delayed { - 0% { - opacity: 0; - } - 33% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -@keyframes fade-out-delayed { - 0% { - opacity: 1; - visibility: visible; - } - 66% { - opacity: 0; - } - 100% { - opacity: 0; - } -} -@keyframes pop-in-from-right { - from { - transform: translate(100%, 0); - } - to { - transform: translate(0, 0); - } -} -@keyframes pop-out-to-right { - from { - transform: translate(0, 0); - visibility: visible; - } - to { - transform: translate(100%, 0); - } -} -body { - background: var(--color-background); - font-family: "Segoe UI", sans-serif; - font-size: 16px; - color: var(--color-text); -} - -a { - color: var(--color-link); - text-decoration: none; -} -a:hover { - text-decoration: underline; -} -a.external[target="_blank"] { - background-image: var(--external-icon); - background-position: top 3px right; - background-repeat: no-repeat; - padding-right: 13px; -} - -code, -pre { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - padding: 0.2em; - margin: 0; - font-size: 0.875rem; - border-radius: 0.8em; -} - -pre { - position: relative; - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; - padding: 10px; - border: 1px solid var(--color-accent); -} -pre code { - padding: 0; - font-size: 100%; -} -pre > button { - position: absolute; - top: 10px; - right: 10px; - opacity: 0; - transition: opacity 0.1s; - box-sizing: border-box; -} -pre:hover > button, -pre > button.visible { - opacity: 1; -} - -blockquote { - margin: 1em 0; - padding-left: 1em; - border-left: 4px solid gray; -} - -.tsd-typography { - line-height: 1.333em; -} -.tsd-typography ul { - list-style: square; - padding: 0 0 0 20px; - margin: 0; -} -.tsd-typography .tsd-index-panel h3, -.tsd-index-panel .tsd-typography h3, -.tsd-typography h4, -.tsd-typography h5, -.tsd-typography h6 { - font-size: 1em; -} -.tsd-typography h5, -.tsd-typography h6 { - font-weight: normal; -} -.tsd-typography p, -.tsd-typography ul, -.tsd-typography ol { - margin: 1em 0; -} -.tsd-typography table { - border-collapse: collapse; - border: none; -} -.tsd-typography td, -.tsd-typography th { - padding: 6px 13px; - border: 1px solid var(--color-accent); -} -.tsd-typography thead, -.tsd-typography tr:nth-child(even) { - background-color: var(--color-background-secondary); -} - -.tsd-breadcrumb { - margin: 0; - padding: 0; - color: var(--color-text-aside); -} -.tsd-breadcrumb a { - color: var(--color-text-aside); - text-decoration: none; -} -.tsd-breadcrumb a:hover { - text-decoration: underline; -} -.tsd-breadcrumb li { - display: inline; -} -.tsd-breadcrumb li:after { - content: " / "; -} - -.tsd-comment-tags { - display: flex; - flex-direction: column; -} -dl.tsd-comment-tag-group { - display: flex; - align-items: center; - overflow: hidden; - margin: 0.5em 0; -} -dl.tsd-comment-tag-group dt { - display: flex; - margin-right: 0.5em; - font-size: 0.875em; - font-weight: normal; -} -dl.tsd-comment-tag-group dd { - margin: 0; -} -code.tsd-tag { - padding: 0.25em 0.4em; - border: 0.1em solid var(--color-accent); - margin-right: 0.25em; - font-size: 70%; -} -h1 code.tsd-tag:first-of-type { - margin-left: 0.25em; -} - -dl.tsd-comment-tag-group dd:before, -dl.tsd-comment-tag-group dd:after { - content: " "; -} -dl.tsd-comment-tag-group dd pre, -dl.tsd-comment-tag-group dd:after { - clear: both; -} -dl.tsd-comment-tag-group p { - margin: 0; -} - -.tsd-panel.tsd-comment .lead { - font-size: 1.1em; - line-height: 1.333em; - margin-bottom: 2em; -} -.tsd-panel.tsd-comment .lead:last-child { - margin-bottom: 0; -} - -.tsd-filter-visibility h4 { - font-size: 1rem; - padding-top: 0.75rem; - padding-bottom: 0.5rem; - margin: 0; -} -.tsd-filter-item:not(:last-child) { - margin-bottom: 0.5rem; -} -.tsd-filter-input { - display: flex; - width: fit-content; - width: -moz-fit-content; - align-items: center; - user-select: none; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - cursor: pointer; -} -.tsd-filter-input input[type="checkbox"] { - cursor: pointer; - position: absolute; - width: 1.5em; - height: 1.5em; - opacity: 0; -} -.tsd-filter-input input[type="checkbox"]:disabled { - pointer-events: none; -} -.tsd-filter-input svg { - cursor: pointer; - width: 1.5em; - height: 1.5em; - margin-right: 0.5em; - border-radius: 0.33em; - /* Leaving this at full opacity breaks event listeners on Firefox. - Don't remove unless you know what you're doing. */ - opacity: 0.99; -} -.tsd-filter-input input[type="checkbox"]:focus + svg { - transform: scale(0.95); -} -.tsd-filter-input input[type="checkbox"]:focus:not(:focus-visible) + svg { - transform: scale(1); -} -.tsd-checkbox-background { - fill: var(--color-accent); -} -input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark { - stroke: var(--color-text); -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-background { - fill: var(--color-background); - stroke: var(--color-accent); - stroke-width: 0.25rem; -} -.tsd-filter-input input:disabled ~ svg > .tsd-checkbox-checkmark { - stroke: var(--color-accent); -} - -.tsd-theme-toggle { - padding-top: 0.75rem; -} -.tsd-theme-toggle > h4 { - display: inline; - vertical-align: middle; - margin-right: 0.75rem; -} - -.tsd-hierarchy { - list-style: square; - margin: 0; -} -.tsd-hierarchy .target { - font-weight: bold; -} - -.tsd-panel-group.tsd-index-group { - margin-bottom: 0; -} -.tsd-index-panel .tsd-index-list { - list-style: none; - line-height: 1.333em; - margin: 0; - padding: 0.25rem 0 0 0; - overflow: hidden; - display: grid; - grid-template-columns: repeat(3, 1fr); - column-gap: 1rem; - grid-template-rows: auto; -} -@media (max-width: 1024px) { - .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(2, 1fr); - } -} -@media (max-width: 768px) { - .tsd-index-panel .tsd-index-list { - grid-template-columns: repeat(1, 1fr); - } -} -.tsd-index-panel .tsd-index-list li { - -webkit-page-break-inside: avoid; - -moz-page-break-inside: avoid; - -ms-page-break-inside: avoid; - -o-page-break-inside: avoid; - page-break-inside: avoid; -} - -.tsd-flag { - display: inline-block; - padding: 0.25em 0.4em; - border-radius: 4px; - color: var(--color-comment-tag-text); - background-color: var(--color-comment-tag); - text-indent: 0; - font-size: 75%; - line-height: 1; - font-weight: normal; -} - -.tsd-anchor { - position: relative; - top: -100px; -} - -.tsd-member { - position: relative; -} -.tsd-member .tsd-anchor + h3 { - display: flex; - align-items: center; - margin-top: 0; - margin-bottom: 0; - border-bottom: none; -} - -.tsd-navigation.settings { - margin: 1rem 0; -} -.tsd-navigation > a, -.tsd-navigation .tsd-accordion-summary { - width: calc(100% - 0.5rem); -} -.tsd-navigation a, -.tsd-navigation summary > span, -.tsd-page-navigation a { - display: inline-flex; - align-items: center; - padding: 0.25rem; - color: var(--color-text); - text-decoration: none; - box-sizing: border-box; -} -.tsd-navigation a.current, -.tsd-page-navigation a.current { - background: var(--color-active-menu-item); -} -.tsd-navigation a:hover, -.tsd-page-navigation a:hover { - text-decoration: underline; -} -.tsd-navigation ul, -.tsd-page-navigation ul { - margin-top: 0; - margin-bottom: 0; - padding: 0; - list-style: none; -} -.tsd-navigation li, -.tsd-page-navigation li { - padding: 0; - max-width: 100%; -} -.tsd-nested-navigation { - margin-left: 3rem; -} -.tsd-nested-navigation > li > details { - margin-left: -1.5rem; -} -.tsd-small-nested-navigation { - margin-left: 1.5rem; -} -.tsd-small-nested-navigation > li > details { - margin-left: -1.5rem; -} - -.tsd-nested-navigation > li > a, -.tsd-nested-navigation > li > span { - width: calc(100% - 1.75rem - 0.5rem); -} - -.tsd-page-navigation ul { - padding-left: 1.75rem; -} - -#tsd-sidebar-links a { - margin-top: 0; - margin-bottom: 0.5rem; - line-height: 1.25rem; -} -#tsd-sidebar-links a:last-of-type { - margin-bottom: 0; -} - -a.tsd-index-link { - padding: 0.25rem 0 !important; - font-size: 1rem; - line-height: 1.25rem; - display: inline-flex; - align-items: center; - color: var(--color-text); -} -.tsd-accordion-summary { - list-style-type: none; /* hide marker on non-safari */ - outline: none; /* broken on safari, so just hide it */ -} -.tsd-accordion-summary::-webkit-details-marker { - display: none; /* hide marker on safari */ -} -.tsd-accordion-summary, -.tsd-accordion-summary a { - user-select: none; - -moz-user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - - cursor: pointer; -} -.tsd-accordion-summary a { - width: calc(100% - 1.5rem); -} -.tsd-accordion-summary > * { - margin-top: 0; - margin-bottom: 0; - padding-top: 0; - padding-bottom: 0; -} -.tsd-index-accordion .tsd-accordion-summary > svg { - margin-left: 0.25rem; -} -.tsd-index-content > :not(:first-child) { - margin-top: 0.75rem; -} -.tsd-index-heading { - margin-top: 1.5rem; - margin-bottom: 0.75rem; -} - -.tsd-kind-icon { - margin-right: 0.5rem; - width: 1.25rem; - height: 1.25rem; - min-width: 1.25rem; - min-height: 1.25rem; -} -.tsd-kind-icon path { - transform-origin: center; - transform: scale(1.1); -} -.tsd-signature > .tsd-kind-icon { - margin-right: 0.8rem; -} - -.tsd-panel { - margin-bottom: 2.5rem; -} -.tsd-panel.tsd-member { - margin-bottom: 4rem; -} -.tsd-panel:empty { - display: none; -} -.tsd-panel > h1, -.tsd-panel > h2, -.tsd-panel > h3 { - margin: 1.5rem -1.5rem 0.75rem -1.5rem; - padding: 0 1.5rem 0.75rem 1.5rem; -} -.tsd-panel > h1.tsd-before-signature, -.tsd-panel > h2.tsd-before-signature, -.tsd-panel > h3.tsd-before-signature { - margin-bottom: 0; - border-bottom: none; -} - -.tsd-panel-group { - margin: 4rem 0; -} -.tsd-panel-group.tsd-index-group { - margin: 2rem 0; -} -.tsd-panel-group.tsd-index-group details { - margin: 2rem 0; -} - -#tsd-search { - transition: background-color 0.2s; -} -#tsd-search .title { - position: relative; - z-index: 2; -} -#tsd-search .field { - position: absolute; - left: 0; - top: 0; - right: 2.5rem; - height: 100%; -} -#tsd-search .field input { - box-sizing: border-box; - position: relative; - top: -50px; - z-index: 1; - width: 100%; - padding: 0 10px; - opacity: 0; - outline: 0; - border: 0; - background: transparent; - color: var(--color-text); -} -#tsd-search .field label { - position: absolute; - overflow: hidden; - right: -40px; -} -#tsd-search .field input, -#tsd-search .title, -#tsd-toolbar-links a { - transition: opacity 0.2s; -} -#tsd-search .results { - position: absolute; - visibility: hidden; - top: 40px; - width: 100%; - margin: 0; - padding: 0; - list-style: none; - box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); -} -#tsd-search .results li { - background-color: var(--color-background); - line-height: initial; - padding: 4px; -} -#tsd-search .results li:nth-child(even) { - background-color: var(--color-background-secondary); -} -#tsd-search .results li.state { - display: none; -} -#tsd-search .results li.current:not(.no-results), -#tsd-search .results li:hover:not(.no-results) { - background-color: var(--color-accent); -} -#tsd-search .results a { - display: flex; - align-items: center; - padding: 0.25rem; - box-sizing: border-box; -} -#tsd-search .results a:before { - top: 10px; -} -#tsd-search .results span.parent { - color: var(--color-text-aside); - font-weight: normal; -} -#tsd-search.has-focus { - background-color: var(--color-accent); -} -#tsd-search.has-focus .field input { - top: 0; - opacity: 1; -} -#tsd-search.has-focus .title, -#tsd-search.has-focus #tsd-toolbar-links a { - z-index: 0; - opacity: 0; -} -#tsd-search.has-focus .results { - visibility: visible; -} -#tsd-search.loading .results li.state.loading { - display: block; -} -#tsd-search.failure .results li.state.failure { - display: block; -} - -#tsd-toolbar-links { - position: absolute; - top: 0; - right: 2rem; - height: 100%; - display: flex; - align-items: center; - justify-content: flex-end; -} -#tsd-toolbar-links a { - margin-left: 1.5rem; -} -#tsd-toolbar-links a:hover { - text-decoration: underline; -} - -.tsd-signature { - margin: 0 0 1rem 0; - padding: 1rem 0.5rem; - border: 1px solid var(--color-accent); - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 14px; - overflow-x: auto; -} - -.tsd-signature-symbol { - color: var(--color-text-aside); - font-weight: normal; -} - -.tsd-signature-type { - font-style: italic; - font-weight: normal; -} - -.tsd-signatures { - padding: 0; - margin: 0 0 1em 0; - list-style-type: none; -} -.tsd-signatures .tsd-signature { - margin: 0; - border-color: var(--color-accent); - border-width: 1px 0; - transition: background-color 0.1s; -} -.tsd-description .tsd-signatures .tsd-signature { - border-width: 1px; -} - -ul.tsd-parameter-list, -ul.tsd-type-parameter-list { - list-style: square; - margin: 0; - padding-left: 20px; -} -ul.tsd-parameter-list > li.tsd-parameter-signature, -ul.tsd-type-parameter-list > li.tsd-parameter-signature { - list-style: none; - margin-left: -20px; -} -ul.tsd-parameter-list h5, -ul.tsd-type-parameter-list h5 { - font-size: 16px; - margin: 1em 0 0.5em 0; -} -.tsd-sources { - margin-top: 1rem; - font-size: 0.875em; -} -.tsd-sources a { - color: var(--color-text-aside); - text-decoration: underline; -} -.tsd-sources ul { - list-style: none; - padding: 0; -} - -.tsd-page-toolbar { - position: sticky; - z-index: 1; - top: 0; - left: 0; - width: 100%; - color: var(--color-text); - background: var(--color-background-secondary); - border-bottom: 1px var(--color-accent) solid; - transition: transform 0.3s ease-in-out; -} -.tsd-page-toolbar a { - color: var(--color-text); - text-decoration: none; -} -.tsd-page-toolbar a.title { - font-weight: bold; -} -.tsd-page-toolbar a.title:hover { - text-decoration: underline; -} -.tsd-page-toolbar .tsd-toolbar-contents { - display: flex; - justify-content: space-between; - height: 2.5rem; - margin: 0 auto; -} -.tsd-page-toolbar .table-cell { - position: relative; - white-space: nowrap; - line-height: 40px; -} -.tsd-page-toolbar .table-cell:first-child { - width: 100%; -} -.tsd-page-toolbar .tsd-toolbar-icon { - box-sizing: border-box; - line-height: 0; - padding: 12px 0; -} - -.tsd-widget { - display: inline-block; - overflow: hidden; - opacity: 0.8; - height: 40px; - transition: - opacity 0.1s, - background-color 0.2s; - vertical-align: bottom; - cursor: pointer; -} -.tsd-widget:hover { - opacity: 0.9; -} -.tsd-widget.active { - opacity: 1; - background-color: var(--color-accent); -} -.tsd-widget.no-caption { - width: 40px; -} -.tsd-widget.no-caption:before { - margin: 0; -} - -.tsd-widget.options, -.tsd-widget.menu { - display: none; -} -input[type="checkbox"] + .tsd-widget:before { - background-position: -120px 0; -} -input[type="checkbox"]:checked + .tsd-widget:before { - background-position: -160px 0; -} - -img { - max-width: 100%; -} - -.tsd-anchor-icon { - display: inline-flex; - align-items: center; - margin-left: 0.5rem; - vertical-align: middle; - color: var(--color-text); -} - -.tsd-anchor-icon svg { - width: 1em; - height: 1em; - visibility: hidden; -} - -.tsd-anchor-link:hover > .tsd-anchor-icon svg { - visibility: visible; -} - -.deprecated { - text-decoration: line-through !important; -} - -.warning { - padding: 1rem; - color: var(--color-warning-text); - background: var(--color-background-warning); -} - -.tsd-kind-project { - color: var(--color-ts-project); -} -.tsd-kind-module { - color: var(--color-ts-module); -} -.tsd-kind-namespace { - color: var(--color-ts-namespace); -} -.tsd-kind-enum { - color: var(--color-ts-enum); -} -.tsd-kind-enum-member { - color: var(--color-ts-enum-member); -} -.tsd-kind-variable { - color: var(--color-ts-variable); -} -.tsd-kind-function { - color: var(--color-ts-function); -} -.tsd-kind-class { - color: var(--color-ts-class); -} -.tsd-kind-interface { - color: var(--color-ts-interface); -} -.tsd-kind-constructor { - color: var(--color-ts-constructor); -} -.tsd-kind-property { - color: var(--color-ts-property); -} -.tsd-kind-method { - color: var(--color-ts-method); -} -.tsd-kind-call-signature { - color: var(--color-ts-call-signature); -} -.tsd-kind-index-signature { - color: var(--color-ts-index-signature); -} -.tsd-kind-constructor-signature { - color: var(--color-ts-constructor-signature); -} -.tsd-kind-parameter { - color: var(--color-ts-parameter); -} -.tsd-kind-type-literal { - color: var(--color-ts-type-literal); -} -.tsd-kind-type-parameter { - color: var(--color-ts-type-parameter); -} -.tsd-kind-accessor { - color: var(--color-ts-accessor); -} -.tsd-kind-get-signature { - color: var(--color-ts-get-signature); -} -.tsd-kind-set-signature { - color: var(--color-ts-set-signature); -} -.tsd-kind-type-alias { - color: var(--color-ts-type-alias); -} - -/* if we have a kind icon, don't color the text by kind */ -.tsd-kind-icon ~ span { - color: var(--color-text); -} - -* { - scrollbar-width: thin; - scrollbar-color: var(--color-accent) var(--color-icon-background); -} - -*::-webkit-scrollbar { - width: 0.75rem; -} - -*::-webkit-scrollbar-track { - background: var(--color-icon-background); -} - -*::-webkit-scrollbar-thumb { - background-color: var(--color-accent); - border-radius: 999rem; - border: 0.25rem solid var(--color-icon-background); -} - -/* mobile */ -@media (max-width: 769px) { - .tsd-widget.options, - .tsd-widget.menu { - display: inline-block; - } - - .container-main { - display: flex; - } - html .col-content { - float: none; - max-width: 100%; - width: 100%; - } - html .col-sidebar { - position: fixed !important; - overflow-y: auto; - -webkit-overflow-scrolling: touch; - z-index: 1024; - top: 0 !important; - bottom: 0 !important; - left: auto !important; - right: 0 !important; - padding: 1.5rem 1.5rem 0 0; - width: 75vw; - visibility: hidden; - background-color: var(--color-background); - transform: translate(100%, 0); - } - html .col-sidebar > *:last-child { - padding-bottom: 20px; - } - html .overlay { - content: ""; - display: block; - position: fixed; - z-index: 1023; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.75); - visibility: hidden; - } - - .to-has-menu .overlay { - animation: fade-in 0.4s; - } - - .to-has-menu .col-sidebar { - animation: pop-in-from-right 0.4s; - } - - .from-has-menu .overlay { - animation: fade-out 0.4s; - } - - .from-has-menu .col-sidebar { - animation: pop-out-to-right 0.4s; - } - - .has-menu body { - overflow: hidden; - } - .has-menu .overlay { - visibility: visible; - } - .has-menu .col-sidebar { - visibility: visible; - transform: translate(0, 0); - display: flex; - flex-direction: column; - gap: 1.5rem; - max-height: 100vh; - padding: 1rem 2rem; - } - .has-menu .tsd-navigation { - max-height: 100%; - } -} - -/* one sidebar */ -@media (min-width: 770px) { - .container-main { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); - grid-template-areas: "sidebar content"; - margin: 2rem auto; - } - - .col-sidebar { - grid-area: sidebar; - } - .col-content { - grid-area: content; - padding: 0 1rem; - } -} -@media (min-width: 770px) and (max-width: 1399px) { - .col-sidebar { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; - padding-top: 1rem; - } - .site-menu { - margin-top: 1rem; - } -} - -/* two sidebars */ -@media (min-width: 1200px) { - .container-main { - grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr) minmax(0, 20rem); - grid-template-areas: "sidebar content toc"; - } - - .col-sidebar { - display: contents; - } - - .page-menu { - grid-area: toc; - padding-left: 1rem; - } - .site-menu { - grid-area: sidebar; - } - - .site-menu { - margin-top: 1rem 0; - } - - .page-menu, - .site-menu { - max-height: calc(100vh - 2rem - 42px); - overflow: auto; - position: sticky; - top: 42px; - } -} diff --git a/docs/classes/RichString.html b/docs/classes/RichString.html deleted file mode 100644 index e23a2e2d3..000000000 --- a/docs/classes/RichString.html +++ /dev/null @@ -1,146 +0,0 @@ -RichString | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Represents a formatted text string. The underlying implementation uses a macOS Attributed String (NSAttributedString) object. -Can be constructed from a plain string in RTF, HTML, or Markdown format.

-

Example

// create a RichString object from a html string
const item = new RichString("<b>bold</b> and <i>italic</i>.", {format: 'html'});
// create a RichString object from a markdown string
const item = new RichString("# Title\n\nBody.", {format: 'markdown'}); -
-
-
-
-

Hierarchy

-
    -
  • RichString
-
-
-
- -
-
-

Constructors

-
-
-

Properties

-
-
-

Constructors

-
- -
    - -
  • -

    Create a new RichString object from a string.

    -
    -
    -

    Parameters

    -
      -
    • -
      source: string
      -

      The string to convert to a RichString object.

      -
      -
    • -
    • -
      Optional options: {
          format?: "rtf" | "html" | "markdown";
      }
      -

      Options for the conversion.

      -
      -
      -
        -
      • -
        Optional format?: "rtf" | "html" | "markdown"
        -

        Format of the source string. Default is 'rtf'.

        -
        -
    -

    Returns RichString

    -
-
-

Properties

-
- -
html: string
-

An HTML representation of the content.

-
-
-
- -
rtf: string
-

An RTF representation of the content.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/defineExtension.html b/docs/functions/defineExtension.html deleted file mode 100644 index 2cf8014c1..000000000 --- a/docs/functions/defineExtension.html +++ /dev/null @@ -1,87 +0,0 @@ -defineExtension | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Function defineExtension

-
-
    - -
  • -

    This global function may be called as an alternative to setting module.exports directly. -The advantage of using defineExtension() is that you will automatically get type checking -and autocomplete for your extension object.

    -

    You may define the shape of the extensions's options object by specifying the -CustomOptions generic type parameter. This will enable type checking and autocomplete for -the options parameter in action functions and the population function.

    -
    -
    -

    Type Parameters

    -
    -
    -

    Parameters

    -
      -
    • -
      extension: Extension<CustomOptions>
      -

      The extension object to export.

      -
      -
    -

    Returns void

    -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/print.html b/docs/functions/print.html deleted file mode 100644 index e8d0a96d7..000000000 --- a/docs/functions/print.html +++ /dev/null @@ -1,86 +0,0 @@ -print | PopClip JavaScript API Reference
-
- -
-
-
- -
-
    - -
  • -

    Output a string for debugging purposes. By default it is not output anywhere, but -you can configure PopClip to output to the Console app by running the following command in Terminal:

    -

    defaults write com.pilotmoon.popclip EnableExtensionDebug -bool YES

    -

    then Quit and restart PopClip.

    -

    Example

    print("Hello, world!")
    // print: Hello, world!
    print(1, Math.PI, 2/3, ['a','b','c'])
    // print: 1 3.141592653589793 0.6666666666666666 a,b,c -
    -
    -
    -

    Parameters

    -
      -
    • -
      Rest ...args: any[]
    -

    Returns void

    -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/require.html b/docs/functions/require.html deleted file mode 100644 index a248ae8ce..000000000 --- a/docs/functions/require.html +++ /dev/null @@ -1,100 +0,0 @@ -require | PopClip JavaScript API Reference
-
- -
-
-
- -
-
    - -
  • -

    Import an object from another file.

    -

    Notes

    PopClip's require() implementation attempts to import from the following module formats:

    -
      -
    • AMD modules, which use define(...).
    • -
    • CommonJS modules, which use module.exports = ... or exports.name = ...
    • -
    • TypeScript-compiled ES modules, which use exports.default = ...
    • -
    -

    Notes

    Paths beginning with ./ or ../ are resolved relative to the the location of the current file.

    -

    Otherwise, the path is resolved relative to the extensions's package root. -If there is no file in the extension, PopClip will look in its internal module repository.

    -

    If no file extension is given, PopCLip will try adding the extensions .js, .ts, .json in that order.

    -

    TypeScript files are transpiled to JavaScript on the fly.

    -

    JSON files are parsed and returned as an object.å

    -
    -
    -

    Parameters

    -
      -
    • -
      file: string
      -

      Path to the file to import.

      -
      -
    -

    Returns object

    The imported object.

    - -
-
- -
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/functions/sleep.html b/docs/functions/sleep.html deleted file mode 100644 index 32be9657b..000000000 --- a/docs/functions/sleep.html +++ /dev/null @@ -1,78 +0,0 @@ -sleep | PopClip JavaScript API Reference
-
- -
-
-
- -
-
    - -
  • -

    A promise-based sleep function. Included as a more convenient alternative -to [[setTimeout]] for performing simple delays. Call as await sleep(1000).

    -
    -
    -

    Parameters

    -
      -
    • -
      durationMilliseconds: number
      -

      How long to sleep in milliseconds

      -
      -
    -

    Returns Promise<void>

    -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 310197f35..000000000 --- a/docs/index.html +++ /dev/null @@ -1,60 +0,0 @@ -PopClip JavaScript API Reference
-
- -
-
-
-
-

PopClip JavaScript API Reference

-

This documentation describes the API available to PopClip's JavaScript actions and module-based extensions.

-

It is auto-generated from the TypeScript definitions file, popclip.d.ts.

-

A good starting point is the PopClip object.

-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Action.html b/docs/interfaces/Action.html deleted file mode 100644 index a7ed8ec44..000000000 --- a/docs/interfaces/Action.html +++ /dev/null @@ -1,440 +0,0 @@ -Action | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface Action<CustomOptions>

-
-

Action represents the properties of a single action. -If code is omitted, the action displays a disabled title/icon only.

-
-
-
-

Type Parameters

-
-
-

Hierarchy

-
-
-
-
- -
-
-

Properties

-
- -
after?: AfterStep
-

An optional step to peform after the main action.

-
-
-
- - -

Declares the application or website associated with this action, if any.

-
-
-
- -
before?: BeforeStep
-

An optional step to peform before the main action.

-
-
-
- -
captureHtml?: boolean
-

Whether PopClip will capture HTML and Markdown content for the selection. Default is no.

-
-
-
- -
captureRtf?: boolean
-

Whether PopClip will capture RTF (Rich Text Format) content for the selection. Default is no.

-
-
-
- -
circle?: boolean
-

Draw the icon inside a circle.

-
-
-
- -
excludedApps?: string[]
-

Array of bundle identifiers for which the extension should not appear. The action will not -appear if PopClip is used in any of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
filled?: boolean
-

Draw the enclosing shape as a solid shape.

-
-
-
- -
flipX?: boolean
-

If true, the supplied icon will be drawn horizontally flipped. Default is false.

-
-
-
- -
flipY?: boolean
-

If true, the supplied icon will be drawn vertically flipped. Default is false.

-
-
-
- -
icon?: null | string
-

A string to define the action's icon.

-

If no icon is defined here, the extension's icon will be used, if any. -Setting to null explicitly sets the action to have no icon.

-
-
-
- -
identifier?: string
-

A unique identifying string. An identifier for an action can be any string of your choosing.

-
-
-
- -
monospaced?: boolean
-

For text icons only. Draw the text using a monospaced font.

-
-
-
- -
moveX?: number
-

Move the icon horizontally by the specified distance, expressed as percentage of the icon's width.

-
-
-
- -
moveY?: number
-

Move the icon vertically by the specified distance, expressed as percentage of the icon's height.

-
-
-
- -
preserveAspect?: boolean
-

If true, the supplied icon will be displayed with its original aspect ratio instead of being scaled to fit a square. Default is false.

-
-
-
- -
preserveColor?: boolean
-

If true, the supplied icon will be displayed with its original color instead of being filled in white/black. Default is false.

-
-
-
- -
regex?: string | RegExp
-

A regular expression to decide whether this action appears in the popup.

-
    -
  • If no regex is specified here, the action takes the value of [[Extension.regex]].
  • -
  • If no regex is specified there either, the action will match any input.
  • -
-

Notes

You may express the value either as a -JavaScript regular expression literal -(or otherwise constructed RegExp object), or as a string.

-
    -
  • If you supply a RegExp it will be evaluated in the JavaScript engine.
  • -
  • If you supply a string it will be evaluated by macOS natively using the NSRegularExpression API (same as for 'classic' PopClip extensions).
  • -
-

If the regex matches the selected text, the action will be shown in the popup and -the first occurrence of the matched text is accessible later via matchedText.

-

If there is no match, the action is excluded from the popup.

-

The regex's lastIndex is reset before and after each invocation, so the g (global) and y (sticky) flags have no effect.

-

This property has no effect on dynamically generated actions.

-

Example

regex = /abc/i   // Example regex 'abc' with 'i' (case insensitive) flag
// Matches abc, ABC, Abc, etc. -
-
-
-
- -
requiredApps?: string[]
-

Array of bundle identifiers for which the extension should appear. The action will only -appear if PopCLip is used in one of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
requirements?: (Requirement | "!url" | "!text" | "!cut" | "!paste" | "!formatting" | "!urls" | "!email" | "!emails" | "!path" | `!option-${string}=${string}`)[]
-

An array of conditions which must be met for this action to appear — see [[Requirement]].

-
    -
  • If no array is specified here, the action takes the value of [[Extension.requirements]].
  • -
  • If no array is specified there either, the action takes the default value ["text"].
  • -
-

Notes

When multiple conditions are specified, all of them must be satisfied.

-

An empty array ([]) indicates no requirements at all, meaning the action will always appear.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
restorePasteboard?: boolean
-

Whether the pasteboard should be restored to its original state after paste-result.

-
-
-
- -
rotate?: number
-

Rotate the icon anticlockwise by the specified angle, expressed in degrees.

-
-
-
- -
scale?: number
-

Scale the icon by the specified factor, expressed as a percentage of the original size.

-
-
-
- -
search?: boolean
-

Draw the icon inside a magnifying glass shape.

-
-
-
- -
square?: boolean
-

Draw the icon inside a square.

-
-
-
- -
stayVisible?: boolean
-

Whether PopClip's popup should stay on screen after clicking this action's button. Default is no.

-
-
-
- -
strike?: boolean
-

Draw a strike-through line over the icon.

-
-
-
- - -

The action's title.

-

If no title is defined here, the extension's [`[name]] will be used, if any.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/ActionProperties.html b/docs/interfaces/ActionProperties.html deleted file mode 100644 index f98873cd2..000000000 --- a/docs/interfaces/ActionProperties.html +++ /dev/null @@ -1,423 +0,0 @@ -ActionProperties | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface ActionProperties

-
-

Properties common to Action and Extension

-
-
-
-

Hierarchy

-
-
-
-
- -
-
-

Properties

-
- -
after?: AfterStep
-

An optional step to peform after the main action.

-
-
-
- - -

Declares the application or website associated with this action, if any.

-
-
-
- -
before?: BeforeStep
-

An optional step to peform before the main action.

-
-
-
- -
captureHtml?: boolean
-

Whether PopClip will capture HTML and Markdown content for the selection. Default is no.

-
-
-
- -
captureRtf?: boolean
-

Whether PopClip will capture RTF (Rich Text Format) content for the selection. Default is no.

-
-
-
- -
circle?: boolean
-

Draw the icon inside a circle.

-
-
-
- -
excludedApps?: string[]
-

Array of bundle identifiers for which the extension should not appear. The action will not -appear if PopClip is used in any of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
filled?: boolean
-

Draw the enclosing shape as a solid shape.

-
-
-
- -
flipX?: boolean
-

If true, the supplied icon will be drawn horizontally flipped. Default is false.

-
-
-
- -
flipY?: boolean
-

If true, the supplied icon will be drawn vertically flipped. Default is false.

-
-
-
- -
icon?: null | string
-

A string to define the action's icon.

-

If no icon is defined here, the extension's icon will be used, if any. -Setting to null explicitly sets the action to have no icon.

-
-
-
- -
identifier?: string
-

A unique identifying string. An identifier for an action can be any string of your choosing.

-
-
-
- -
monospaced?: boolean
-

For text icons only. Draw the text using a monospaced font.

-
-
-
- -
moveX?: number
-

Move the icon horizontally by the specified distance, expressed as percentage of the icon's width.

-
-
-
- -
moveY?: number
-

Move the icon vertically by the specified distance, expressed as percentage of the icon's height.

-
-
-
- -
preserveAspect?: boolean
-

If true, the supplied icon will be displayed with its original aspect ratio instead of being scaled to fit a square. Default is false.

-
-
-
- -
preserveColor?: boolean
-

If true, the supplied icon will be displayed with its original color instead of being filled in white/black. Default is false.

-
-
-
- -
regex?: string | RegExp
-

A regular expression to decide whether this action appears in the popup.

-
    -
  • If no regex is specified here, the action takes the value of [[Extension.regex]].
  • -
  • If no regex is specified there either, the action will match any input.
  • -
-

Notes

You may express the value either as a -JavaScript regular expression literal -(or otherwise constructed RegExp object), or as a string.

-
    -
  • If you supply a RegExp it will be evaluated in the JavaScript engine.
  • -
  • If you supply a string it will be evaluated by macOS natively using the NSRegularExpression API (same as for 'classic' PopClip extensions).
  • -
-

If the regex matches the selected text, the action will be shown in the popup and -the first occurrence of the matched text is accessible later via matchedText.

-

If there is no match, the action is excluded from the popup.

-

The regex's lastIndex is reset before and after each invocation, so the g (global) and y (sticky) flags have no effect.

-

This property has no effect on dynamically generated actions.

-

Example

regex = /abc/i   // Example regex 'abc' with 'i' (case insensitive) flag
// Matches abc, ABC, Abc, etc. -
-
-
-
- -
requiredApps?: string[]
-

Array of bundle identifiers for which the extension should appear. The action will only -appear if PopCLip is used in one of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
requirements?: (Requirement | "!url" | "!text" | "!cut" | "!paste" | "!formatting" | "!urls" | "!email" | "!emails" | "!path" | `!option-${string}=${string}`)[]
-

An array of conditions which must be met for this action to appear — see [[Requirement]].

-
    -
  • If no array is specified here, the action takes the value of [[Extension.requirements]].
  • -
  • If no array is specified there either, the action takes the default value ["text"].
  • -
-

Notes

When multiple conditions are specified, all of them must be satisfied.

-

An empty array ([]) indicates no requirements at all, meaning the action will always appear.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
restorePasteboard?: boolean
-

Whether the pasteboard should be restored to its original state after paste-result.

-
-
-
- -
rotate?: number
-

Rotate the icon anticlockwise by the specified angle, expressed in degrees.

-
-
-
- -
scale?: number
-

Scale the icon by the specified factor, expressed as a percentage of the original size.

-
-
-
- -
search?: boolean
-

Draw the icon inside a magnifying glass shape.

-
-
-
- -
square?: boolean
-

Draw the icon inside a square.

-
-
-
- -
stayVisible?: boolean
-

Whether PopClip's popup should stay on screen after clicking this action's button. Default is no.

-
-
-
- -
strike?: boolean
-

Draw a strike-through line over the icon.

-
-
-
- - -

The action's title.

-

If no title is defined here, the extension's [`[name]] will be used, if any.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/AssociatedApp.html b/docs/interfaces/AssociatedApp.html deleted file mode 100644 index 4b16f241c..000000000 --- a/docs/interfaces/AssociatedApp.html +++ /dev/null @@ -1,123 +0,0 @@ -AssociatedApp | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface AssociatedApp

-
-

Declares information about an app or website that this extension interacts with.

-
-
-
-

Hierarchy

-
    -
  • AssociatedApp
-
-
-
- -
-
-

Properties

-
- -
bundleIdentifiers?: string[]
-

List of possible bundle identifiers of this app.

-
-
-
- -
checkInstalled?: boolean
-

Indicates whether PopClip should check for the presence of the app on the computer. Default is false.

-
-
-
- -
link: string
-

Web page where user can obtain the app, e.g. "https://www.literatureandlatte.com/scrivener".

-
-
-
- -
name: string
-

Name of the app. For example "Scrivener"

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/AuthInfo.html b/docs/interfaces/AuthInfo.html deleted file mode 100644 index 27caae4a3..000000000 --- a/docs/interfaces/AuthInfo.html +++ /dev/null @@ -1,135 +0,0 @@ -AuthInfo | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Credentials used in auth function

-
-
-
-

Hierarchy

-
    -
  • AuthInfo
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- -
identifier: string
-

Extension identifier

-
-
-
- -
name: string
-

Extension display name

-
-
-
- -
password: string
-

Value of password option (will be empty string if none defined)

-
-
-
- -
redirect: string
-

An appropriate value to use as the redirection URL in authorization flows for this extension. -Example output: -http://localhost:58906/callback/com.pilotmoon.popclip.extension.todoist/auth

-
-
-
- -
username: string
-

Value of username option (will be empty string if none defined)

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/AuthOptions.html b/docs/interfaces/AuthOptions.html deleted file mode 100644 index 83136db9b..000000000 --- a/docs/interfaces/AuthOptions.html +++ /dev/null @@ -1,94 +0,0 @@ -AuthOptions | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface AuthOptions

-
-

The authsecret property has the special behaviour of throwing an Error with the message 'Not signed in' if it is accessed while either -undefined or holding an empty string.

-
-
-
-

Hierarchy

-
    -
  • AuthOptions
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- -
authsecret: string
-

The stored value that was returned from the auth() function.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Context.html b/docs/interfaces/Context.html deleted file mode 100644 index 10b6ad494..000000000 --- a/docs/interfaces/Context.html +++ /dev/null @@ -1,163 +0,0 @@ -Context | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Properties relating the context surrounding the selected text.

-
-
-
-

Hierarchy

-
    -
  • Context
-
-
-
- -
-
-

Properties

-
- -
appIdentifier: string
-

The bundle identitifier of the current app, for example com.agiletortoise.Drafts-OSX.

-
-
-
- -
appName: string
-

The name of the current app, for example Drafts.

-
-
-
- -
browserTitle: string
-

If the current app is a compatible browser, this will be the page title.

-
-
-
- -
browserUrl: string
-

If the current app is a compatible browser, this will be the page URL.

-
-
-
- -
canCopy: boolean
-

This property is true iff text was selected.

-
-
-
- -
canCut: boolean
-

This property is true iff text was selected and the app's Cut command is enabled.

-
-
-
- -
canPaste: boolean
-

This property is true iff the Paste command is enabled in the current app.

-
-
-
- -
hasFormatting: boolean
-

Indicates whether the text area supports formatting.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Extension.html b/docs/interfaces/Extension.html deleted file mode 100644 index 8f2ee509b..000000000 --- a/docs/interfaces/Extension.html +++ /dev/null @@ -1,501 +0,0 @@ -Extension | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface Extension<CustomOptions>

-
-

The Extension object defines the PopClip extension.

-
-
-
-

Type Parameters

-
-
-

Hierarchy

-
-
-
-
- -
-
-

Properties

-
- -
action?: Action<CustomOptions> | ActionFunction<CustomOptions>
-

Simplified property to define a single action.

-
-
-
- -
actions?: (Action<CustomOptions> | ActionFunction<CustomOptions>)[] | PopulationFunction<CustomOptions>
-

Define the actions to go in PopClip's popup. This can be an array or a function.

-
    -
  • If it's an array, the supplied actions are used in the popup, subject to meeting the -requirements and regex conditions.

    -
  • -
  • If it's a population function, it is called by PopClip to dynamically populate the popup with actions from this extension. -Setting requirements and regex keys has no effect on dynamic actions — the function itself is responsible for deciding what actions to show. -Population function requires the dynamic entitlement.

    -
  • -
-
-
-
- -
after?: AfterStep
-

An optional step to peform after the main action.

-
-
-
- - -

Declares the application or website associated with this action, if any.

-
-
-
- -
auth?: any
-

If you define this function then PopClip will display a 'sign in' button in the options UI. When the user clicks the button, -PopClip will call this function with an info object and an flow callback.

-

If the sign in needs a username and password, you'll also need to define username and password options. PopClip will then pass the values -of those options in the info parameter.

-
-
-
- -
before?: BeforeStep
-

An optional step to peform before the main action.

-
-
-
- -
captureHtml?: boolean
-

Whether PopClip will capture HTML and Markdown content for the selection. Default is no.

-
-
-
- -
captureRtf?: boolean
-

Whether PopClip will capture RTF (Rich Text Format) content for the selection. Default is no.

-
-
-
- -
circle?: boolean
-

Draw the icon inside a circle.

-
-
-
- -
excludedApps?: string[]
-

Array of bundle identifiers for which the extension should not appear. The action will not -appear if PopClip is used in any of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
filled?: boolean
-

Draw the enclosing shape as a solid shape.

-
-
-
- -
flipX?: boolean
-

If true, the supplied icon will be drawn horizontally flipped. Default is false.

-
-
-
- -
flipY?: boolean
-

If true, the supplied icon will be drawn vertically flipped. Default is false.

-
-
-
- -
icon?: null | string
-

A string to define the action's icon.

-

If no icon is defined here, the extension's icon will be used, if any. -Setting to null explicitly sets the action to have no icon.

-
-
-
- -
identifier?: string
-

A unique identifying string. An identifier for an action can be any string of your choosing.

-
-
-
- -
monospaced?: boolean
-

For text icons only. Draw the text using a monospaced font.

-
-
-
- -
moveX?: number
-

Move the icon horizontally by the specified distance, expressed as percentage of the icon's width.

-
-
-
- -
moveY?: number
-

Move the icon vertically by the specified distance, expressed as percentage of the icon's height.

-
-
-
- - -

The display name of this extension.

-
-
-
- -
options?: Option[]
-

Defines the user-configurable options for this extension.

-
-
-
- -
preserveAspect?: boolean
-

If true, the supplied icon will be displayed with its original aspect ratio instead of being scaled to fit a square. Default is false.

-
-
-
- -
preserveColor?: boolean
-

If true, the supplied icon will be displayed with its original color instead of being filled in white/black. Default is false.

-
-
-
- -
regex?: string | RegExp
-

A regular expression to decide whether this action appears in the popup.

-
    -
  • If no regex is specified here, the action takes the value of [[Extension.regex]].
  • -
  • If no regex is specified there either, the action will match any input.
  • -
-

Notes

You may express the value either as a -JavaScript regular expression literal -(or otherwise constructed RegExp object), or as a string.

-
    -
  • If you supply a RegExp it will be evaluated in the JavaScript engine.
  • -
  • If you supply a string it will be evaluated by macOS natively using the NSRegularExpression API (same as for 'classic' PopClip extensions).
  • -
-

If the regex matches the selected text, the action will be shown in the popup and -the first occurrence of the matched text is accessible later via matchedText.

-

If there is no match, the action is excluded from the popup.

-

The regex's lastIndex is reset before and after each invocation, so the g (global) and y (sticky) flags have no effect.

-

This property has no effect on dynamically generated actions.

-

Example

regex = /abc/i   // Example regex 'abc' with 'i' (case insensitive) flag
// Matches abc, ABC, Abc, etc. -
-
-
-
- -
requiredApps?: string[]
-

Array of bundle identifiers for which the extension should appear. The action will only -appear if PopCLip is used in one of the specified apps.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
requirements?: (Requirement | "!url" | "!text" | "!cut" | "!paste" | "!formatting" | "!urls" | "!email" | "!emails" | "!path" | `!option-${string}=${string}`)[]
-

An array of conditions which must be met for this action to appear — see [[Requirement]].

-
    -
  • If no array is specified here, the action takes the value of [[Extension.requirements]].
  • -
  • If no array is specified there either, the action takes the default value ["text"].
  • -
-

Notes

When multiple conditions are specified, all of them must be satisfied.

-

An empty array ([]) indicates no requirements at all, meaning the action will always appear.

-

This property has no effect on dynamically generated actions.

-
-
-
- -
restorePasteboard?: boolean
-

Whether the pasteboard should be restored to its original state after paste-result.

-
-
-
- -
rotate?: number
-

Rotate the icon anticlockwise by the specified angle, expressed in degrees.

-
-
-
- -
scale?: number
-

Scale the icon by the specified factor, expressed as a percentage of the original size.

-
-
-
- -
search?: boolean
-

Draw the icon inside a magnifying glass shape.

-
-
-
- -
square?: boolean
-

Draw the icon inside a square.

-
-
-
- -
stayVisible?: boolean
-

Whether PopClip's popup should stay on screen after clicking this action's button. Default is no.

-
-
-
- -
strike?: boolean
-

Draw a strike-through line over the icon.

-
-
-
- - -

The action's title.

-

If no title is defined here, the extension's [`[name]] will be used, if any.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/IconProperties.html b/docs/interfaces/IconProperties.html deleted file mode 100644 index a9cf06610..000000000 --- a/docs/interfaces/IconProperties.html +++ /dev/null @@ -1,225 +0,0 @@ -IconProperties | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface IconProperties

-
-

Properties that define how an icon is interpreted.

-
-
-
-

Hierarchy

-
-
-
-
- -
-
-

Properties

-
- -
circle?: boolean
-

Draw the icon inside a circle.

-
-
-
- -
filled?: boolean
-

Draw the enclosing shape as a solid shape.

-
-
-
- -
flipX?: boolean
-

If true, the supplied icon will be drawn horizontally flipped. Default is false.

-
-
-
- -
flipY?: boolean
-

If true, the supplied icon will be drawn vertically flipped. Default is false.

-
-
-
- -
monospaced?: boolean
-

For text icons only. Draw the text using a monospaced font.

-
-
-
- -
moveX?: number
-

Move the icon horizontally by the specified distance, expressed as percentage of the icon's width.

-
-
-
- -
moveY?: number
-

Move the icon vertically by the specified distance, expressed as percentage of the icon's height.

-
-
-
- -
preserveAspect?: boolean
-

If true, the supplied icon will be displayed with its original aspect ratio instead of being scaled to fit a square. Default is false.

-
-
-
- -
preserveColor?: boolean
-

If true, the supplied icon will be displayed with its original color instead of being filled in white/black. Default is false.

-
-
-
- -
rotate?: number
-

Rotate the icon anticlockwise by the specified angle, expressed in degrees.

-
-
-
- -
scale?: number
-

Scale the icon by the specified factor, expressed as a percentage of the original size.

-
-
-
- -
search?: boolean
-

Draw the icon inside a magnifying glass shape.

-
-
-
- -
square?: boolean
-

Draw the icon inside a square.

-
-
-
- -
strike?: boolean
-

Draw a strike-through line over the icon.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Input.html b/docs/interfaces/Input.html deleted file mode 100644 index 6d22b62d8..000000000 --- a/docs/interfaces/Input.html +++ /dev/null @@ -1,218 +0,0 @@ -Input | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Input defines properties to access the input text contents.

-
-
-
-

Hierarchy

-
    -
  • Input
-
-
-
- -
-
-

Properties

-
- - -

Unprocessed selection contents indexed by UTI.

-
-
-
- -
data: {
    emails: RangedStrings;
    nonHttpUrls: RangedStrings;
    paths: RangedStrings;
    urls: RangedStrings;
}
-

Data of various kinds, that PopClip detected in the selected text.

-
-
-

Type declaration

-
    -
  • -
    emails: RangedStrings
    -

    Email addresses.

    -
    -
  • -
  • -
    nonHttpUrls: RangedStrings
    -

    Other protocols or app urls e.g. ftp:, omnifocus:, craftdocs: etc. (PopClip has a pre-defined allowlist -for custom URL schemes.)

    -
    -
  • -
  • -
    paths: RangedStrings
    -

    Local file paths.

    -
    -
  • -
  • -
    urls: RangedStrings
    -

    HTTP ot HTTPS urls.

    -
    -
-
-
- -
html: string
-

HTML content (if captureHtml is true).

-
-
-
- -
isUrl: boolean
-

Indicate if the text content is just a web URL (or URL-like string -such as popclip.app), allowing for leading and trailing whitespace.

-
-
-
- -
markdown: string
-

Markdown content (if captureHtml is true).

-
-
-
- -
matchedText: string
-

If the action specified requirements or a regex to match the input, this will be the matching part of the text. -Otherwise, it will be the same string as [[text]].

-
-
-
- -
regexResult?: null | string[] | RegExpMatchArray
-

If the action specified a regex to match the input, this will be the result of the the match.

-

You can use this to access any capture groups from the regex.

-

If the regex was specified as a JavaScript regex, the value is a return value from JavaScript's -RegExp.prototype.exec() method.

-

If the regex was specified as an ICU regex in the static config, the value is the array of capture components.

-

Example

// text: "apple", regex: /.(.)/
selection.regexResult[0] // "ap" (full match)
selection.regexResult[1] // "p" (capture group 1) -
-
-
-
- -
rtf: string
-

RTF content (if captureRtf is true).

-
-
-
- -
text: string
-

The plain text selected by the user. If there is no selected text, this will be the empty string.

-
-
-
- -
xhtml: string
-

XHTML content (if captureHtml is true).

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Modifiers.html b/docs/interfaces/Modifiers.html deleted file mode 100644 index cf5ef6daf..000000000 --- a/docs/interfaces/Modifiers.html +++ /dev/null @@ -1,125 +0,0 @@ -Modifiers | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Represents the state of the four modifier keys. The value is true when the key is held down -at the time the action is invoked. -See PopClip.modifiers.

-
-
-
-

Hierarchy

-
    -
  • Modifiers
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- -
command: boolean
-

Command (⌘) key state.

-
-
-
- -
control: boolean
-

Control (⌃) key state.

-
-
-
- -
option: boolean
-

Option (⌥) key state.

-
-
-
- -
shift: boolean
-

Shift (⇧) key state.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Option.html b/docs/interfaces/Option.html deleted file mode 100644 index 61098bdf6..000000000 --- a/docs/interfaces/Option.html +++ /dev/null @@ -1,174 +0,0 @@ -Option | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Defines a single extension option.

-
-
-
-

Hierarchy

-
    -
  • Option
-
-
-
- -
-
-

Properties

-
- -
defaultValue?: string | boolean
-

The default value of the option. If ommitted, string options default to the empty string, -boolean options default to true, and multiple options default to the top item in the list. -A password field may not have a default value.

-
-
-
- -
description?: LocalizableString
-

An optional longer explanantion of this option, to be shown in the UI.

-
-
-
- -
icon?: string
-

An icon for this option. It is only displayed for boolean options, next to the check box.

-
-
-
- -
identifier: string
-

An identifying string for this option.

-
-
-
- - -

A short label for this option.

-
-
-
- -
type: "string" | "boolean" | "multiple" | "password" | "heading" | "secret"
-

The kind of option, one of:

-
    -
  • string: a text box for free text entry,
  • -
  • boolean: a check box,
  • -
  • multiple: multiple-choice drop-down with predefined options,
  • -
  • secret: concealed text entry field (persisted in user's keychain),
  • -
  • password: concealed text entry field (not persisted, only passed to auth function),
  • -
  • heading: adds a heading in the user interface, but does not actually define an option
  • -
-
-
-
- -
valueLabels?: LocalizableString[]
-

Display names corresponding to the entries in the [[values]] array. These are shown in the option UI. -If ommitted, the raw value strings are shown instead.

-
-
-
- -
values?: string[]
-

The possible values for a multiple option.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Options.html b/docs/interfaces/Options.html deleted file mode 100644 index 7d30c39f5..000000000 --- a/docs/interfaces/Options.html +++ /dev/null @@ -1,69 +0,0 @@ -Options | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Represents the current values of the extension's settings.

-
-
-
-

Hierarchy

-
    -
  • Options
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/PasteOptions.html b/docs/interfaces/PasteOptions.html deleted file mode 100644 index fee0a9566..000000000 --- a/docs/interfaces/PasteOptions.html +++ /dev/null @@ -1,94 +0,0 @@ -PasteOptions | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface PasteOptions

-
-

Options for Paste operations.

-
-
-
-

Hierarchy

-
    -
  • PasteOptions
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- -
restore?: boolean
-

Whether to restore the original contents of the pasteboard after the paste -operation. Default is false.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Pasteboard.html b/docs/interfaces/Pasteboard.html deleted file mode 100644 index 4d3161e94..000000000 --- a/docs/interfaces/Pasteboard.html +++ /dev/null @@ -1,116 +0,0 @@ -Pasteboard | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface Pasteboard

-
-

A simplified interface to the macOS pasteboard. Implemented by the global object, [[pasteboard]].

-
-
-
-

Hierarchy

-
    -
  • Pasteboard
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- - -

Get and set the content of the pasteboard, of the specified types

-
-
-
- -
text: string
-

Get and set the plain text content of the pasteboard.

-

Notes

This property corresponds with the pasteboard type public.utf8-plain-text.

-

When placing text on the pasteboard this way, PopClip's "Copied" notification will not appear. -(Typically, scripts should use [[copyText]] instead, so that the user gets the "Copied" notification.)

-

The value of this property will always be a string. If there is no plain text value on the -pasteboard, reading this property will give an empty string ("").

-

Example

let x = pasteboard.text;
pasteboard.text = "new text"; -
-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/PasteboardContent.html b/docs/interfaces/PasteboardContent.html deleted file mode 100644 index d4bf520ef..000000000 --- a/docs/interfaces/PasteboardContent.html +++ /dev/null @@ -1,69 +0,0 @@ -PasteboardContent | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface PasteboardContent

-
-

Represents the raw pasteboard content, indexed by UTI. Supports string data only.

-
-
-
-

Hierarchy

-
    -
  • PasteboardContent
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/PopClip.html b/docs/interfaces/PopClip.html deleted file mode 100644 index 6b00d65ff..000000000 --- a/docs/interfaces/PopClip.html +++ /dev/null @@ -1,533 +0,0 @@ -PopClip | PopClip JavaScript API Reference
-
- -
-
-
- -
-

This interface describes the methods and properties of the global [[popclip]] object.

-
-
-
-

Hierarchy

-
    -
  • PopClip
-
-
-
- -
-
-

Properties

-
- -
appear: (() => void)
-
-

Type declaration

-
    -
  • -
      -
    • (): void
    • -
    • -

      Trigger PopClip to appear again with the current selection.

      -
      -

      Returns void

      -
-
- -
context: Context
-

The current context.

-
-
-
- -
copyContent: ((content) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (content): void
    • -
    • -

      Copy arbitrary pasteboard content.

      -
      -
      -

      Parameters

      -
      -

      Returns void

      -
-
- -
copyText: ((text) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (text): void
    • -
    • -

      Places the given string on the pasteboard, and shows "Copied" notificaction to the user.

      -
      -
      -

      Parameters

      -
        -
      • -
        text: string
        -

        The plain text string to copy

        -
        -
      -

      Returns void

      -
-
- -
input: Input
-

The current selection.

-
-
-
- -
modifiers: Modifiers
-

The state of the modifier keys when the action was invoked in PopClip.

-

Notes

During the execution of the population function, all the modifiers will read as false.

-
-
-
- -
openUrl: ((url, options?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (url, options?): void
    • -
    • -

      Open a URL in an application.

      -

      Choice of application

      If a target application bundle identifier is specified via the app option, PopClip will ask that app to open the URL.

      -

      If no target app is specified:

      -
        -
      • If the URL has the http or https scheme, and the current app is a browser, the URL is opened in the current app.
      • -
      • Otherwise, PopClip asks macOS to open the URL in the default handler for that URL type.
      • -
      -

      URL encoding

      Any parameters etc. in the URL must be appropriately percent-encoded. JavaScript provides the -encodeURIComponent() -function for this.

      -

      Example

      popclip.openUrl("https://xkcd.com"); // open xckd.com in current/default browser
      popclip.openUrl("https://xkcd.com", {app: "com.brave.Browser"}); // open xkcd.com in Brave browser
      popclip.openUrl(`mailto:support@pilotmoon.com?subject=${encodeURIComponent("What's up?")}`); // open mailto link in the default mail application -
      -
      -
      -

      Parameters

      -
        -
      • -
        url: string
        -

        A well-formed URL

        -
        -
      • -
      • -
        Optional options: {
            app?: string;
        }
        -

        Options.

        -
        -
        -
          -
        • -
          Optional app?: string
          -

          Bundle identifier of the app to open the URL with. For example "com.google.Chrome".

          -
          -
      -

      Returns void

      -
-
- -
options: Options & AuthOptions
-

The current values of the options.

-
-
-
- -
pasteContent: ((content, options?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (content, options?): void
    • -
    • -

      Paste arbitrary pasteboard content.

      -
      -
      -

      Parameters

      -
      -

      Returns void

      -
-
- -
pasteText: ((text, options?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (text, options?): void
    • -
    • -

      If the target app's Paste command is available, this method places the given string on the pasteboard -and then invokes the target app's Paste comand. If the restore flag is set in the options, it will -then restore the original pasteboard contents.

      -

      If the target app's Paste command is not available, it behaves as [[copyText]] instead.

      -

      Example

      // place "Hello" on the clipboard and invoke Paste
      popclip.pasteText("Hello");
      // place "Hello", then restore the original pasteboard contents
      popclip.pasteText("Hello", {restore: true}); -
      -
      -
      -

      Parameters

      -
        -
      • -
        text: string
        -

        The plain text string to paste

        -
        -
      • -
      • -
        Optional options: PasteOptions
        -
      -

      Returns void

      -
-
- -
performCommand: ((command, options?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (command, options?): void
    • -
    • -

      Invokes a command in the target app.

      -
      -
      -

      Parameters

      -
        -
      • -
        command: "cut" | "paste" | "copy"
        -

        Either cut, copy or paste.

        -
        -
      • -
      • -
        Optional options: {
            transform?: "none" | "plain";
        }
        -

        Options for the command.

        -
        -
        -
          -
        • -
          Optional transform?: "none" | "plain"
          -

          Transformation to apply to the pasteboard contents. (Default: none)

          -
            -
          • none: regular pasteboard operation
          • -
          • plain: strips away everything but plain text
          • -
          -
          -
      -

      Returns void

      -
-
- -
pressKey: ((key, modifiers?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (key, modifiers?): void
    • -
    • -

      Simulate a key press by the user.

      -

      Examples

      // press the key combo ⌘B
      popclip.pressKey('command B');
      // press the key combo ⌥⌘H
      popclip.pressKey('option command H');
      // press the return key
      popclip.pressKey('return');
      popclip.pressKey(util.constant.KEY_RETURN); // equivalent
      * // press option and the page down key
      popclip.pressKey('option 0x79');
      popclip.pressKey(0x79, util.constant.MODIFIER_OPTION); // equivalent -
      -

      Notes

      Some key code and modifier constants are available in util.constant.

      -
      -
      -

      Parameters

      -
        -
      • -
        key: string | number
        -

        The key to press. When this parameter is a string, PopClip will interpret it as in -Key Press actions. -When this parameter is a number, PopClip will use that exact key code.

        -
        -
      • -
      • -
        Optional modifiers: number
        -

        An optional bit mask specifiying additional modifier keys, if any.

        -
        -
      -

      Returns void

      -
-
- -
share: ((serviceName, items) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (serviceName, items): void
    • -
    • -

      Share items with a named macOS sharing service.

      -

      Example

      // share a string with the Messages service
      popclip.share("com.apple.share.Messages.window", ["Hello, world!"]);
      // share a URL with the Safari Reading List service
      popclip.share("com.apple.share.System.add-to-safari-reading-list", [{ url: "https://example.com" }]);
      // share a an html string with the Notes service
      const item = new RichString("Some <b>simple</b> html", { format: html })
      popclip.share("com.apple.Notes.SharingExtension", [item]); -
      -

      Notes

      The list of available sharing services is determined by the user's system configuration.

      -
      -
      -

      Parameters

      -
        -
      • -
        serviceName: string
        -

        The name of the sharing service to use.

        -
        -
      • -
      • -
        items: (string | RichString | {
            url: string;
        })[]
        -

        An array of items to share. Each item can be a string, a RichString object, or an object with a url property.

        -
        -
      -

      Returns void

      -
      -

      Throws

      If the service name is not recognized, or if the service cannot handle the supplied items, an error is thrown.

      -
-
- -
showFailure: (() => void)
-
-

Type declaration

-
    -
  • -
      -
    • (): void
    • -
    • -

      PopClip will show an "X" symbol to indicate failure.

      -
      -

      Returns void

      -
-
- -
showSettings: (() => void)
-
-

Type declaration

-
    -
  • -
      -
    • (): void
    • -
    • -

      PopClip will open the settings UI for this extension.

      -

      Notes

      If the extension has no settings, this method does nothing.

      -
      -

      Returns void

      -
-
- -
showSuccess: (() => void)
-
-

Type declaration

-
    -
  • -
      -
    • (): void
    • -
    • -

      PopClip will show a checkmark symbol to indicate success.

      -
      -

      Returns void

      -
-
- -
showText: ((text, options?) => void)
-
-

Type declaration

-
    -
  • -
      -
    • (text, options?): void
    • -
    • -

      Display text inside PopClip's popup, with option to make the display a clickable button to -paste the text.

      -
      -
      -

      Parameters

      -
        -
      • -
        text: string
        -

        The text to display. It will be truncated to 160 characters when shown.

        -
        -
      • -
      • -
        Optional options: {
            preview?: boolean;
        }
        -
        -
          -
        • -
          Optional preview?: boolean
          -

          If true, and the app's Paste command is available, the displayed text will be in a cickable button, -which clicked, pastes the full text.

          -
          -
      -

      Returns void

      -
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Range.html b/docs/interfaces/Range.html deleted file mode 100644 index d86376372..000000000 --- a/docs/interfaces/Range.html +++ /dev/null @@ -1,69 +0,0 @@ -Range | PopClip JavaScript API Reference
-
- -
-
-
- -
-

Represents a generic range, as a location and length

-
-
-
-

Hierarchy

-
    -
  • Range
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/RangedStrings.html b/docs/interfaces/RangedStrings.html deleted file mode 100644 index 9de825b45..000000000 --- a/docs/interfaces/RangedStrings.html +++ /dev/null @@ -1,71 +0,0 @@ -RangedStrings | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface RangedStrings

-
-

An array of strings with an addiontal ranges property defining the source of the data in the orignal string.

-
-
-
-

Hierarchy

-
    -
  • Array<string> -
      -
    • RangedStrings
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/StringTable.html b/docs/interfaces/StringTable.html deleted file mode 100644 index 4e777a0e8..000000000 --- a/docs/interfaces/StringTable.html +++ /dev/null @@ -1,263 +0,0 @@ -StringTable | PopClip JavaScript API Reference
-
- -
-
-
-
- -

Interface StringTable

-
-

An object giving strings for the different languages PopClip supports. See [[LocalizableString]].

-
-
-
-

Hierarchy

-
    -
  • StringTable
-
-
-
- -
-
-

Properties

-
-
-

Properties

-
- -
da?: string
-

Danish language string.

-
-
-
- -
de?: string
-

German language string.

-
-
-
- -
en: string
-

English (US) language string.

-
-
-
- -
en-GB?: string
-

English (UK) language string.

-
-
-
- -
es?: string
-

Spanish language string.

-
-
-
- -
fr?: string
-

French language string.

-
-
-
- -
it?: string
-

Italian language string.

-
-
-
- -
ja?: string
-

Japanese language string.

-
-
-
- -
ko?: string
-

Korean language string.

-
-
-
- -
nl?: string
-

Dutch language string.

-
-
-
- -
pl?: string
-

Polish language string.

-
-
-
- -
pt-BR?: string
-

Brazilian Portuguese language string.

-
-
-
- -
ru?: string
-

Russian language string.

-
-
-
- -
sk?: string
-

Slovak language string.

-
-
-
- -
tr?: string
-

Turkish language string.

-
-
-
- -
vi?: string
-

Vietnamese language string.

-
-
-
- -
zh-Hans?: string
-

Simplified Chinese language string.

-
-
-
- -
zh-Hant?: string
-

Traditional Chinese language string.

-
-
-
-
-

Generated using TypeDoc

-
\ No newline at end of file diff --git a/docs/interfaces/Util.html b/docs/interfaces/Util.html deleted file mode 100644 index b4f21b8be..000000000 --- a/docs/interfaces/Util.html +++ /dev/null @@ -1,354 +0,0 @@ -Util | PopClip JavaScript API Reference
-
- -
-
-
- -
-

A container for various utility functions and constants [[util]] object.

-
-
-
-

Hierarchy

-
    -
  • Util
-
-
-
- -
-
-

Properties

-
- -
base64Decode: ((string) => string)
-
-

Type declaration

-
    -
  • -
      -
    • (string): string
    • -
    • -

      Decode a Base-64 string and interpret the result as a UTF-8 string.

      -

      Accepts both standard and URL-safe variants as input. Also accepts input with or without the =/== end padding. -Throws an error if the input cannot be decoded as a UTF-8 string.

      -
      -
      -

      Parameters

      -
        -
      • -
        string: string
        -
      -

      Returns string

      The decoded string

      - -
-
- -
base64Encode: ((string, options?) => string)
-
-

Type declaration

-
    -
  • -
      -
    • (string, options?): string
    • -
    • -

      Encode a string as UTF-8 then Base-64 encode the result.

      -
      -
      -

      Parameters

      -
        -
      • -
        string: string
        -

        The string to encode.

        -
        -
      • -
      • -
        Optional options: {
            trimmed?: boolean;
            urlSafe?: boolean;
        }
        -
        -
          -
        • -
          Optional trimmed?: boolean
          -

          Whether to trim the =/== padding from the string. Default is no.

          -
          -
        • -
        • -
          Optional urlSafe?: boolean
          -

          Whether to encode using the URL-safe variant, with - and _ substituted for + and /. Default is no.

          -
          -
      -

      Returns string

      -
-
- -
buildQuery: ((params) => string)
-
-

Type declaration

-
    -
  • -
      -
    • (params): string
    • -
    • -

      Build a query from params object

      -
      -
      -

      Parameters

      -
        -
      • -
        params: {}
        -
        -

        Returns string

        -
    -
    - -
    buildQueryUrl: ((baseUrl, params) => string)
    -
    -

    Type declaration

    -
      -
    • -
        -
      • (baseUrl, params): string
      • -
      • -

        Build a URL from a base URL and additional query parameters

        -
        -
        -

        Parameters

        -
          -
        • -
          baseUrl: string
        • -
        • -
          params: {}
          -
          -

          Returns string

          -
      -
      - -
      clarify: ((obscuredString) => any)
      -
      -

      Type declaration

      -
        -
      • -
          -
        • (obscuredString): any
        • -
        • -

          Decipher a JSON object that has been lightly obscured to prevent constants such as -API keys appearing in plaintext in the source files.

          -

          This function will ROT13 decipher the text, apply Base64 decoding, and parse the result as JSON.

          -
          -
          -

          Parameters

          -
            -
          • -
            obscuredString: string
          -

          Returns any

          -
      -
      - -
      constant: {
          KEY_DELETE: 51;
          KEY_DOWNARROW: 125;
          KEY_ESCAPE: 53;
          KEY_LEFTARROW: 123;
          KEY_RETURN: 36;
          KEY_RIGHTARROW: 124;
          KEY_SPACE: 49;
          KEY_TAB: 48;
          KEY_UPARROW: 126;
          MODIFIER_COMMAND: 1048576;
          MODIFIER_CONTROL: 262144;
          MODIFIER_OPTION: 524288;
          MODIFIER_SHIFT: 131072;
      }
      -

      The constant property is a container for pre-defined constants.

      -
      -
      -

      Type declaration

      -
        -
      • -
        Readonly KEY_DELETE: 51
        -

        Key code for the Delete (⌫) key.

        -
        -
      • -
      • -
        Readonly KEY_DOWNARROW: 125
        -

        Key code for the Down Arrow key.

        -
        -
      • -
      • -
        Readonly KEY_ESCAPE: 53
        -

        Key code for the Escape key.

        -
        -
      • -
      • -
        Readonly KEY_LEFTARROW: 123
        -

        Key code for the Left Arrow key.

        -
        -
      • -
      • -
        Readonly KEY_RETURN: 36
        -

        Key code for the Return (↵) key.

        -
        -
      • -
      • -
        Readonly KEY_RIGHTARROW: 124
        -

        Key code for the Right Arrow key.

        -
        -
      • -
      • -
        Readonly KEY_SPACE: 49
        -

        Key code for the space bar.

        -
        -
      • -
      • -
        Readonly KEY_TAB: 48
        -

        Key code for the Tab (⇥) key.

        -
        -
      • -
      • -
        Readonly KEY_UPARROW: 126
        -

        Key code for the Up Arrow key.

        -
        -
      • -
      • -
        Readonly MODIFIER_COMMAND: 1048576
        -

        Bit mask for the Command (⌘) key.

        -
        -
      • -
      • -
        Readonly MODIFIER_CONTROL: 262144
        -

        Bit mask for the Control (⌃) key.

        -
        -
      • -
      • -
        Readonly MODIFIER_OPTION: 524288
        -

        Bit mask for the Option (⌥) key.

        -
        -
      • -
      • -
        Readonly MODIFIER_SHIFT: 131072
        -

        Bit mask for the Shift (⇧) key.

        -
        -
      -
      -
      - -
      localize: ((string) => string)
      -
      -

      Type declaration

      -
        -
      • -
          -
        • (string): string
        • -
        • -

          Localize an English string into the current user interface language, if possible. -This will work for strings which match an existing string in PopClip's user interface.

          -
          -
          -

          Parameters

          -
            -
          • -
            string: string
            -

            The string to localize.

            -
            -
          -

          Returns string

          The localized string, or the original string if no localized version was avaiable.

          - -
      -
      - -
      parseQuery: ((query) => any)
      -
      -

      Type declaration

      -
        -
      • -
          -
        • (query): any
        • -
        • -

          Parse a query into params object

          -
          -
          -

          Parameters

          -
            -
          • -
            query: string
          -

          Returns any

          -
      -
      -
      -

      Generated using TypeDoc

      -
      \ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html deleted file mode 100644 index 40ac1ed6c..000000000 --- a/docs/modules.html +++ /dev/null @@ -1,111 +0,0 @@ -PopClip JavaScript API Reference
      -
      - -
      - -
      -

      Generated using TypeDoc

      -
      \ No newline at end of file diff --git a/docs/types/ActionFunction.html b/docs/types/ActionFunction.html deleted file mode 100644 index 7de460941..000000000 --- a/docs/types/ActionFunction.html +++ /dev/null @@ -1,97 +0,0 @@ -ActionFunction | PopClip JavaScript API Reference
      -
      - -
      -
      -
      -
      - -

      Type alias ActionFunction<CustomOptions>

      -
      ActionFunction<CustomOptions>: ((input, options, context) => Promise<string | void> | string | void)
      -
      -

      Type Parameters

      -
      -
      -

      Type declaration

      -
        -
      • -
          -
        • (input, options, context): Promise<string | void> | string | void
        • -
        • -

          An action function is called when the user clicks the action button in PopClip. This is where -the extension does its main work.

          -
          -
          -

          Parameters

          -
            -
          • -
            input: Input
            -

            The selected text and related properties. (Same object as [[PopClip.selection]].)

            -
            -
          • -
          • -
            options: CustomOptions & AuthOptions
            -

            Current values of the options for this extension. (Same object as [[PopClip.options]].)

            -
            -
          • -
          • -
            context: Context
            -

            Information about the context surrounding the selection. (Same object as [[PopClip.context]].)

            -
            -
          -

          Returns Promise<string | void> | string | void

          -
      -
      -
      -

      Generated using TypeDoc

      -
      \ No newline at end of file diff --git a/docs/types/AfterStep.html b/docs/types/AfterStep.html deleted file mode 100644 index 15924af27..000000000 --- a/docs/types/AfterStep.html +++ /dev/null @@ -1,65 +0,0 @@ -AfterStep | PopClip JavaScript API Reference
      -
      - -
      -
      -
      -
      - -

      Type alias AfterStep

      -
      AfterStep: BeforeStep | "popclip-appear" | "show-status" | "copy-result" | "paste-result" | "show-result" | "preview-result"
      -

      Strings which can be used to specify the [[after]] action.

      -
      -
      -
      -
      -

      Generated using TypeDoc

      -
      \ No newline at end of file diff --git a/docs/types/AuthFlowFunction.html b/docs/types/AuthFlowFunction.html deleted file mode 100644 index 830e945e2..000000000 --- a/docs/types/AuthFlowFunction.html +++ /dev/null @@ -1,83 +0,0 @@ -AuthFlowFunction | PopClip JavaScript API Reference
      -
      - -
      -
      -
      -
      - -

      Type alias AuthFlowFunction

      -
      AuthFlowFunction: ((url, params?, expect?) => Promise<any>)
      -
      -

      Type declaration

      -
        -
      • -
          -
        • (url, params?, expect?): Promise<any>
        • -
        • -

          Object returned by [[Extension.auth]] when there is an authentication flow to kick off

          -
          -
          -

          Parameters

          -
            -
          • -
            url: string
          • -
          • -
            Optional params: {}
            -
            • -
            • -
              Optional expect: string[]
            -

            Returns Promise<any>

            -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/AuthFunction.html b/docs/types/AuthFunction.html deleted file mode 100644 index 86a4c5229..000000000 --- a/docs/types/AuthFunction.html +++ /dev/null @@ -1,80 +0,0 @@ -AuthFunction | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias AuthFunction

        -
        AuthFunction: ((info, flow) => Promise<string>)
        -
        -

        Type declaration

        -
          -
        • -
            -
          • (info, flow): Promise<string>
          • -
          • -

            Function signature of the [[Extension.auth]] method.

            -
            -
            -

            Parameters

            -
            -

            Returns Promise<string>

            -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/BeforeStep.html b/docs/types/BeforeStep.html deleted file mode 100644 index 685e1b4b9..000000000 --- a/docs/types/BeforeStep.html +++ /dev/null @@ -1,65 +0,0 @@ -BeforeStep | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias BeforeStep

        -
        BeforeStep: "cut" | "copy" | "paste" | "paste-plain"
        -

        Strings which can be used to specify the [[before]] action.

        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/LocalizableString.html b/docs/types/LocalizableString.html deleted file mode 100644 index af40af4a0..000000000 --- a/docs/types/LocalizableString.html +++ /dev/null @@ -1,81 +0,0 @@ -LocalizableString | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias LocalizableString

        -
        LocalizableString: string | StringTable
        -

        A type to represent a localizable string.

        -

        Notes

        The value may be either a string or an object. -If you supply a string, that string is used. -If you supply a [[StringTable]] object, PopClip will -display the string for the user's preferred language if possible, with fallback to the en string.

        -

        Example

        option.label = "Color" // just use this string
        option.label = { en: "Color", "en-GB": "Colour", fr: "Couleur", "zh-Hans": "颜色" } -
        -
        -
        -
        - -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/NegatedRequirement.html b/docs/types/NegatedRequirement.html deleted file mode 100644 index bff41d081..000000000 --- a/docs/types/NegatedRequirement.html +++ /dev/null @@ -1,65 +0,0 @@ -NegatedRequirement | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias NegatedRequirement

        -
        NegatedRequirement: `!${Requirement}`
        -

        Negated form of [[Requirement]].

        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/PopulationFunction.html b/docs/types/PopulationFunction.html deleted file mode 100644 index fb2925411..000000000 --- a/docs/types/PopulationFunction.html +++ /dev/null @@ -1,97 +0,0 @@ -PopulationFunction | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias PopulationFunction<CustomOptions>

        -
        PopulationFunction<CustomOptions>: ((input, options, context) => (Action | ActionFunction)[] | Action | ActionFunction | void)
        -
        -

        Type Parameters

        -
        -
        -

        Type declaration

        -
          -
        • -
            -
          • (input, options, context): (Action | ActionFunction)[] | Action | ActionFunction | void
          • -
          • -

            A population function dynamically generates the actions for the extension. See [[Extension.actions]].

            -
            -
            -

            Parameters

            -
              -
            • -
              input: Input
              -

              The selected text and related properties. (Same object as [[PopClip.selection]].)

              -
              -
            • -
            • -
              options: CustomOptions
              -

              Current values of the options for this extension. (Same object as [[PopClip.options]].)

              -
              -
            • -
            • -
              context: Context
              -

              Information about the context surrounding the selection. (Same object as [[PopClip.context]].)

              -
              -
            -

            Returns (Action | ActionFunction)[] | Action | ActionFunction | void

            A single action, an array of actions.

            - -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/types/Requirement.html b/docs/types/Requirement.html deleted file mode 100644 index cd7956e16..000000000 --- a/docs/types/Requirement.html +++ /dev/null @@ -1,74 +0,0 @@ -Requirement | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Type alias Requirement

        -
        Requirement: "text" | "cut" | "paste" | "formatting" | "url" | "urls" | "email" | "emails" | "path" | `option-${string}=${string}`
        -

        A requirement is specified in the Action.requirements array as a string.

        -

        Example

        ["paste", "!urls", "option-goFishing=1"]
        -
        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/variables/pasteboard-1.html b/docs/variables/pasteboard-1.html deleted file mode 100644 index bbf2c5e87..000000000 --- a/docs/variables/pasteboard-1.html +++ /dev/null @@ -1,65 +0,0 @@ -pasteboard | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Variable pasteboardConst

        -
        pasteboard: Pasteboard
        -

        The global pasteboard object provides access to the contents of the macOS general pasteboard (i.e. the system clipboard). It implements [[Pasteboard]].

        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/variables/popclip-1.html b/docs/variables/popclip-1.html deleted file mode 100644 index 9a9dd1c87..000000000 --- a/docs/variables/popclip-1.html +++ /dev/null @@ -1,66 +0,0 @@ -popclip | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Variable popclipConst

        -
        popclip: PopClip
        -

        The global popclip object encapsulates the user's current interaction with PopClip, and provides methods -for performing various actions. It implements [[PopClip]].

        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/docs/variables/util-1.html b/docs/variables/util-1.html deleted file mode 100644 index 0dd88dd51..000000000 --- a/docs/variables/util-1.html +++ /dev/null @@ -1,65 +0,0 @@ -util | PopClip JavaScript API Reference
        -
        - -
        -
        -
        -
        - -

        Variable utilConst

        -
        util: Util
        -

        The global util object acts as a container for various utility functions and constants. It implements [[Util]].

        -
        -
        -
        -
        -

        Generated using TypeDoc

        -
        \ No newline at end of file diff --git a/popclip.d.ts b/popclip.d.ts deleted file mode 100644 index b18727b9a..000000000 --- a/popclip.d.ts +++ /dev/null @@ -1,1275 +0,0 @@ -/* -This is a TypeScript definitions file for PopClip's JavaScript interface. -This file lets TypeScript-aware editors provide auto-complete and -syntax checking for both JavaScript and TypeScript code. - -One way to point your editor to this file is to add a line like this to -the top of your JS or TS: -/// -*/ - -/** - * An object giving strings for the different languages PopClip supports. See [[LocalizableString]]. - */ -declare interface StringTable { - /** English (US) language string. */ - en: string - /** English (UK) language string. */ - 'en-GB'?: string - /** Danish language string. */ - da?: string - /** German language string. */ - de?: string - /** Spanish language string. */ - es?: string - /** French language string. */ - fr?: string - /** Italian language string. */ - it?: string - /** Japanese language string. */ - ja?: string - /** Korean language string. */ - ko?: string - /** Dutch language string. */ - nl?: string - /** Polish language string. */ - pl?: string - /** Brazilian Portuguese language string. */ - 'pt-BR'?: string - /** Russian language string. */ - ru?: string - /** Slovak language string. */ - sk?: string - /** Turkish language string. */ - tr?: string - /** Vietnamese language string. */ - vi?: string - /** Simplified Chinese language string. */ - 'zh-Hans'?: string - /** Traditional Chinese language string. */ - 'zh-Hant'?: string - /** Any other strings. */ - [code: string]: string -} - -/** - * A type to represent a localizable string. - * - * #### Notes - * - * The value may be either a string or an object. - * If you supply a string, that string is used. - * If you supply a [[StringTable]] object, PopClip will - * display the string for the user's preferred language if possible, with fallback to the `en` string. - * - * #### Example - * ```js - * option.label = "Color" // just use this string - * option.label = { en: "Color", "en-GB": "Colour", fr: "Couleur", "zh-Hans": "颜色" } - * ``` - */ -declare type LocalizableString = string | StringTable - -/** - * Represents the state of the four modifier keys. The value is true when the key is held down - * at the time the action is invoked. - * See {@link PopClip.modifiers}. - */ -declare interface Modifiers { - /** Shift (⇧) key state. */ - shift: boolean - /** Control (⌃) key state. */ - control: boolean - /** Option (⌥) key state. */ - option: boolean - /** Command (⌘) key state. */ - command: boolean -} - -/** - * A requirement is specified in the {@link Action.requirements} array as a string. - * - * #### Example - * ```js - * ["paste", "!urls", "option-goFishing=1"] - * ``` - */ - declare type Requirement = - | 'text' | 'cut' | 'paste' | 'formatting' | 'url' | 'urls' | 'email' | 'emails' | 'path' - | `option-${string}=${string}` - - /** Negated form of [[Requirement]]. */ - declare type NegatedRequirement = `!${Requirement}` - - /** - * Strings which can be used to specify the [[before]] action. - */ - declare type BeforeStep = 'cut' | 'copy' | 'paste' | 'paste-plain' - - /** - * Strings which can be used to specify the [[after]] action. - */ - declare type AfterStep = BeforeStep | 'popclip-appear' | 'show-status' | 'copy-result' | 'paste-result' | 'show-result' | 'preview-result' - -/** - * Declares information about an app or website that this extension interacts with. - */ -declare interface AssociatedApp { - /** - * Name of the app. For example "Scrivener" - */ - name: string - - /** - * Web page where user can obtain the app, e.g. "https://www.literatureandlatte.com/scrivener". - */ - link: string - - /** - * Indicates whether PopClip should check for the presence of the app on the computer. Default is false. - */ - checkInstalled?: boolean - - /** - * List of possible bundle identifiers of this app. - */ - bundleIdentifiers?: string[] -} - -/** - * A population function dynamically generates the actions for the extension. See [[Extension.actions]]. - * @param input The selected text and related properties. (Same object as [[PopClip.selection]].) - * @param options Current values of the options for this extension. (Same object as [[PopClip.options]].) - * @param context Information about the context surrounding the selection. (Same object as [[PopClip.context]].) - * @returns A single action, an array of actions. - */ -declare type PopulationFunction = (input: Input, options: CustomOptions, context: Context) => (Action | ActionFunction)[] | Action | ActionFunction | void - - -/** - * Object returned by [[Extension.auth]] when there is an authentication flow to kick off - */ -declare type AuthFlowFunction = (url: string, params?: {[string]: string | undefined}, expect?: string[]) => Promise - -/** - * Credentials used in auth function - * */ -declare interface AuthInfo { - /** Value of `username` option (will be empty string if none defined) */ - username: string - /** Value of `password` option (will be empty string if none defined) */ - password: string - /** An appropriate value to use as the redirection URL in authorization flows for this extension. - * Example output: - * `http://localhost:58906/callback/com.pilotmoon.popclip.extension.todoist/auth` - */ - redirect: string - /** Extension display name */ - name: string - /** Extension identifier */ - identifier: string -} - -/** - * Function signature of the [[Extension.auth]] method. - */ -declare type AuthFunction = (info: AuthInfo, flow: AuthFlowFunction) => Promise - -/** - * Properties that define how an icon is interpreted. - */ -declare interface IconProperties { - /** - * If true, the supplied icon will be displayed with its original color instead of being filled in white/black. Default is false. - */ - preserveColor?: boolean - /** - * If true, the supplied icon will be displayed with its original aspect ratio instead of being scaled to fit a square. Default is false. - */ - preserveAspect?: boolean - /** - * If true, the supplied icon will be drawn horizontally flipped. Default is false. - */ - flipX?: boolean - /** - * If true, the supplied icon will be drawn vertically flipped. Default is false. - */ - flipY?: boolean - - /** - * Move the icon horizontally by the specified distance, expressed as percentage of the icon's width. - */ - moveX?: number - - /** - * Move the icon vertically by the specified distance, expressed as percentage of the icon's height. - */ - moveY?: number - - /** - * Scale the icon by the specified factor, expressed as a percentage of the original size. - */ - scale?: number - - /** - * Rotate the icon anticlockwise by the specified angle, expressed in degrees. - */ - rotate?: number - - /** - Draw the icon inside a square. - */ - square?: boolean - - /** - * Draw the icon inside a circle. - */ - circle?: boolean - - /** - * Draw the icon inside a magnifying glass shape. - */ - search?: boolean - - /** - * Draw a strike-through line over the icon. - */ - strike?: boolean - - /** - * Draw the enclosing shape as a solid shape. - */ - filled?: boolean - - /** - * For text icons only. Draw the text using a monospaced font. - */ - monospaced?: boolean -} - - -/** - * Properties common to Action and Extension - */ -declare interface ActionProperties extends IconProperties { - - /** - * A unique identifying string. An identifier for an action can be any string of your choosing. - */ - identifier?: string - - /** - * The action's title. - * - * If no title is defined here, the extension's [`[name]] will be used, if any. - */ - title?: LocalizableString - - /** - * A string to define the action's icon. - * - * If no icon is defined here, the extension's {@link Extension.icon | icon} will be used, if any. - * Setting to `null` explicitly sets the action to have no icon. - */ - icon?: string | null - - /** - * An array of conditions which must be met for this action to appear — see [[Requirement]]. - * - * * If no array is specified here, the action takes the value of [[Extension.requirements]]. - * * If no array is specified there either, the action takes the default value `["text"]`. - * - * #### Notes - * - * When multiple conditions are specified, all of them must be satisfied. - * - * An empty array (`[]`) indicates no requirements at all, meaning the action will always appear. - * - * This property has no effect on dynamically generated actions. - */ - requirements?: Array - - /** - * Array of bundle identifiers for which the extension should appear. The action will only - * appear if PopCLip is used in one of the specified apps. - * - * This property has no effect on dynamically generated actions. - */ - requiredApps?: string[] - - /** - * Array of bundle identifiers for which the extension should not appear. The action will not - * appear if PopClip is used in any of the specified apps. - * - * This property has no effect on dynamically generated actions. - */ - excludedApps?: string[] - - /** - * A regular expression to decide whether this action appears in the popup. - * - * * If no regex is specified here, the action takes the value of [[Extension.regex]]. - * * If no regex is specified there either, the action will match any input. - * - * #### Notes - * - * You may express the value either as a - * [JavaScript regular expression literal](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) - * (or otherwise constructed `RegExp` object), or as a string. - * - * * If you supply a `RegExp` it will be evaluated in the JavaScript engine. - * * If you supply a string it will be evaluated by macOS natively using the `NSRegularExpression` API (same as for 'classic' PopClip extensions). - * - * If the regex matches the selected text, the action will be shown in the popup and - * the first occurrence of the matched text is accessible later via {@link Input.matchedText | matchedText}. - * - * If there is no match, the action is excluded from the popup. - * - * The regex's `lastIndex` is reset before and after each invocation, so the `g` (global) and `y` (sticky) flags have no effect. - * - * This property has no effect on dynamically generated actions. - * - * #### Example - * ```js - * regex = /abc/i // Example regex 'abc' with 'i' (case insensitive) flag - * // Matches abc, ABC, Abc, etc. - * ``` - */ - regex?: RegExp | string - - /** - * Declares the application or website associated with this action, if any. - */ - app?: AssociatedApp - apps?: AssociatedApp[] - - /** - * An optional step to peform before the main action. - */ - before?: BeforeStep - - /** - * An optional step to peform after the main action. - */ - after?: AfterStep - - /** - * Whether PopClip will capture HTML and Markdown content for the selection. Default is no. - */ - captureHtml?: boolean - - /** - * Whether PopClip will capture RTF (Rich Text Format) content for the selection. Default is no. - */ - captureRtf?: boolean - - /** - * Whether PopClip's popup should stay on screen after clicking this action's button. Default is no. - */ - stayVisible?: boolean - - /** - * Whether the pasteboard should be restored to its original state after `paste-result`. - */ - restorePasteboard?: boolean - - // static properties for benefit of JSON Schema - shortcutName?: string - serviceName?: string - url?: string - keyCombo?: string | number - keyCombos?: Array - applescript?: string - applescriptFile?: string - applescriptCall?: { - handler: string - parameters?: string[] - } - shellScript?: string - shellScriptFile?: string - interpreter?: string - javascript?: string - javascriptFile?: string -} - -/** - * An action function is called when the user clicks the action button in PopClip. This is where - * the extension does its main work. - * @param input The selected text and related properties. (Same object as [[PopClip.selection]].) - * @param options Current values of the options for this extension. (Same object as [[PopClip.options]].) - * @param context Information about the context surrounding the selection. (Same object as [[PopClip.context]].) - */ -declare type ActionFunction = (input: Input, options: CustomOptions & AuthOptions, context: Context) => Promise | string | void - -/** - * **Action** represents the properties of a single action. - * If `code` is omitted, the action displays a disabled title/icon only. - */ -declare interface Action extends ActionProperties { - code?: ActionFunction -} - -// included for JSON Schema -declare type Entitlement = 'network' | 'dynamic' - -/** - * The Extension object defines the PopClip extension. - */ -declare interface Extension extends ActionProperties { - - /** - * The display name of this extension. - */ - name?: LocalizableString - - /** - * Defines the user-configurable options for this extension. - */ - options?: Option[] - - /** - * If you define this function then PopClip will display a 'sign in' button in the options UI. When the user clicks the button, - * PopClip will call this function with an `info` object and an `flow` callback. - * - * If the sign in needs a username and password, you'll also need to define `username` and `password` options. PopClip will then pass the values - * of those options in the info parameter. */ - auth?: AuthFunction - - /** - * Define the actions to go in PopClip's popup. This can be an array or a function. - * - * - If it's an array, the supplied actions are used in the popup, subject to meeting the - * requirements and regex conditions. - * - * - If it's a population function, it is called by PopClip to dynamically populate the popup with actions from this extension. - * Setting requirements and regex keys has no effect on dynamic actions — the function itself is responsible for deciding what actions to show. - * Population function requires the `dynamic` entitlement. - */ - actions?: (Action | ActionFunction)[] | PopulationFunction - - /** - * Simplified property to define a single action. - */ - action?: Action | ActionFunction - - // the following are static properties, included for the benefit of the JSON Scheme generation - popclipVersion?: number - macosVersion?: string - entitlements?: Entitlement[] - module?: string -} - -/** - * Defines a single extension option. - */ -declare interface Option { - /** - * An identifying string for this option. - */ - identifier: string - - /** - * The kind of option, one of: - * * `string`: a text box for free text entry, - * * `boolean`: a check box, - * * `multiple`: multiple-choice drop-down with predefined options, - * * `secret`: concealed text entry field (persisted in user's keychain), - * * `password`: concealed text entry field (not persisted, only passed to auth function), - * * `heading`: adds a heading in the user interface, but does not actually define an option - */ - type: 'string' | 'boolean' | 'multiple' | 'password' | 'heading' | 'secret' - - /** - * A short label for this option. - */ - label?: LocalizableString - - /** - * An optional longer explanantion of this option, to be shown in the UI. - */ - description?: LocalizableString - - /** - * The default value of the option. If ommitted, `string` options default to the empty string, - * `boolean` options default to true, and `multiple` options default to the top item in the list. - * A `password` field may not have a default value. - */ - defaultValue?: string | boolean - - /** - * The possible values for a `multiple` option. - */ - values?: string[] - - /** - * Display names corresponding to the entries in the [[values]] array. These are shown in the option UI. - * If ommitted, the raw value strings are shown instead. - */ - valueLabels?: LocalizableString[] - - /** - * An icon for this option. It is only displayed for boolean options, next to the check box. - */ - icon?: string - - /* - * If true, this option will be hidden in the prefs window. Default is false. - */ - hidden?: boolean - - /* - * If true, this option will be be inset to the right of its label, instead of below it. Default is false. - */ - inset?: boolean -} - -/** - * Represents a generic range, as a location and length - */ -declare interface Range { - location: number - length: number -} - -/** - * An array of strings with an addiontal `ranges` property defining the source of the data in the orignal string. - */ -declare interface RangedStrings extends Array { - ranges: Range[] -} - -/** - * Input defines properties to access the input text contents. - */ -declare interface Input { - /** - * The plain text selected by the user. If there is no selected text, this will be the empty string. - */ - text: string - - /** - * If the action specified {@link Action.requirements | requirements} or a {@link Action.regex | regex} to match the input, this will be the matching part of the text. - * Otherwise, it will be the same string as [[text]]. - */ - matchedText: string - - /** - * If the action specified a {@link Action.regex | regex} to match the input, this will be the result of the the match. - * - * You can use this to access any capture groups from the regex. - * - * If the regex was specified as a JavaScript regex, the value is a return value from JavaScript's - * [RegExp.prototype.exec()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) method. - * - * If the regex was specified as an ICU regex in the static config, the value is the array of capture components. - * - * #### Example - * ```js - * // text: "apple", regex: /.(.)/ - * selection.regexResult[0] // "ap" (full match) - * selection.regexResult[1] // "p" (capture group 1) - * ``` - */ - regexResult?: RegExpMatchArray | string[] | null - - /** - * HTML content (if `captureHtml` is true). - */ - html: string - - /** - * XHTML content (if `captureHtml` is true). - */ - xhtml: string - - /** - * Markdown content (if `captureHtml` is true). - */ - markdown: string - - /** - * RTF content (if `captureRtf` is true). - */ - rtf: string - - /** - * Data of various kinds, that PopClip detected in the selected text. - */ - data: { - /** - * HTTP ot HTTPS urls. - */ - urls: RangedStrings - /** - * Other protocols or app urls e.g. `ftp:`, `omnifocus:`, `craftdocs:` etc. (PopClip has a pre-defined allowlist - * for custom URL schemes.) - */ - nonHttpUrls: RangedStrings - /** - * Email addresses. - */ - emails: RangedStrings - /** - * Local file paths. - * */ - paths: RangedStrings - } - - /** - * Unprocessed selection contents indexed by UTI. - */ - content: PasteboardContent - - /** - Indicate if the text content is *just* a web URL (or URL-like string - such as `popclip.app`), allowing for leading and trailing whitespace. - */ - isUrl: boolean -} - -/** -* Properties relating the context surrounding the selected text. -*/ -declare interface Context { - /** - * Indicates whether the text area supports formatting. - */ - hasFormatting: boolean - - /** - * This property is true iff the Paste command is enabled in the current app. - */ - canPaste: boolean - - /** - * This property is true iff text was selected. - */ - canCopy: boolean - - /** - * This property is true iff text was selected and the app's Cut command is enabled. - */ - canCut: boolean - - /** - * If the current app is a compatible browser, this will be the page URL. - */ - browserUrl: string - - /** - * If the current app is a compatible browser, this will be the page title. - */ - browserTitle: string - - /** - * The name of the current app, for example `Drafts`. - */ - appName: string - - /** - * The bundle identitifier of the current app, for example `com.agiletortoise.Drafts-OSX`. - */ - appIdentifier: string -} - -/** - * Represents the current values of the extension's settings. - */ -declare interface Options { - readonly [identifier: string]: string | boolean -} - -/** - * The `authsecret` property has the special behaviour of throwing an `Error` with the message 'Not signed in' if it is accessed while either - * undefined or holding an empty string. - */ -declare interface AuthOptions { - /** - * The stored value that was returned from the `auth()` function. - */ - authsecret: string -} - -/** -* This interface describes the methods and properties of the global [[`popclip`]] object. -* -*/ -declare interface PopClip { - /** - * The state of the modifier keys when the action was invoked in PopClip. - * - * #### Notes - * During the execution of the population function, all the modifiers will read as false. - */ - readonly modifiers: Modifiers - - /** - * The current selection. - */ - readonly input: Input - - /** - * The current context. - */ - readonly context: Context - - /** - * The current values of the options. - */ - readonly options: Options & AuthOptions - - /** - * If the target app's Paste command is available, this method places the given string on the pasteboard - * and then invokes the target app's Paste comand. If the `restore` flag is set in the options, it will - * then restore the original pasteboard contents. - * - * If the target app's Paste command is not available, it behaves as [[copyText]] instead. - * - * #### Example - * - * ```js - * // place "Hello" on the clipboard and invoke Paste - * popclip.pasteText("Hello"); - * // place "Hello", then restore the original pasteboard contents - * popclip.pasteText("Hello", {restore: true}); - * ``` - * @param text The plain text string to paste - * @param options - */ - pasteText: (text: string, options?: PasteOptions) => void - - /** - * Paste arbitrary pasteboard content. - */ - pasteContent: (content: PasteboardContent, options?: PasteOptions) => void - - /** - * Places the given string on the pasteboard, and shows "Copied" notificaction to the user. - * @param text The plain text string to copy - */ - copyText: (text: string) => void - - /** - * Copy arbitrary pasteboard content. - */ - copyContent: (content: PasteboardContent) => void - - /** - * Invokes a command in the target app. - * @param command Either `cut`, `copy` or `paste`. - * @param options Options for the command. - */ - performCommand: (command: 'cut'|'copy'|'paste', options?: { - /** Transformation to apply to the pasteboard contents. (Default: `none`) - * - `none`: regular pasteboard operation - * - `plain`: strips away everything but plain text - */ - transform?: 'none'|'plain' - }) => void - - /** - * Display text inside PopClip's popup, with option to make the display a clickable button to - * paste the text. - * @param text The text to display. It will be truncated to 160 characters when shown. - * @param options - */ - showText: (text: string, options?: { - /** - * If `true`, and the app's Paste command is available, the displayed text will be in a cickable button, - * which clicked, pastes the full text. - */ - preview?: boolean - }) => void - - /** - * PopClip will show a checkmark symbol to indicate success. - */ - showSuccess: () => void - - /** - * PopClip will show an "X" symbol to indicate failure. - */ - showFailure: () => void - - /** - * PopClip will open the settings UI for this extension. - * - * #### Notes - * If the extension has no settings, this method does nothing. - */ - showSettings: () => void - - /** - * Trigger PopClip to appear again with the current selection. - */ - appear: () => void - - /** - * Simulate a key press by the user. - * - * #### Examples - * - * ```js - * // press the key combo ⌘B - * popclip.pressKey('command B'); - * // press the key combo ⌥⌘H - * popclip.pressKey('option command H'); - * // press the return key - * popclip.pressKey('return'); - * popclip.pressKey(util.constant.KEY_RETURN); // equivalent - * * // press option and the page down key - * popclip.pressKey('option 0x79'); - * popclip.pressKey(0x79, util.constant.MODIFIER_OPTION); // equivalent - * ``` - * - * #### Notes - * - * Some key code and modifier constants are available in {@link Util.constant | util.constant}. - * - * @param key The key to press. When this parameter is a string, PopClip will interpret it as in - * [Key Press actions](https://www.popclip.app/dev/key-press-actions). - * When this parameter is a number, PopClip will use that exact key code. - * - * @param modifiers An optional bit mask specifiying additional modifier keys, if any. - */ - pressKey: (key: string | number, modifiers?: number) => void - - /** - * Open a URL in an application. - * - * #### Choice of application - * - * If a target application bundle identifier is specified via the `app` option, PopClip will ask that app to open the URL. - * - * If no target app is specified: - * - * - If the URL has the http or https scheme, and the current app is a browser, the URL is opened in the current app. - * - Otherwise, PopClip asks macOS to open the URL in the default handler for that URL type. - * - * #### URL encoding - * - * Any parameters etc. in the URL must be appropriately percent-encoded. JavaScript provides the - * [encodeURIComponent()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) - * function for this. - * - * #### Example - * ```js - * popclip.openUrl("https://xkcd.com"); // open xckd.com in current/default browser - * popclip.openUrl("https://xkcd.com", {app: "com.brave.Browser"}); // open xkcd.com in Brave browser - * popclip.openUrl(`mailto:support@pilotmoon.com?subject=${encodeURIComponent("What's up?")}`); // open mailto link in the default mail application - * ``` - * - * @param url A well-formed URL - * @param options Options. - */ - openUrl: (url: string, options?: { - /** - * Bundle identifier of the app to open the URL with. For example `"com.google.Chrome"`. - */ - app?: string - }) => void - - /** - * Share items with a named macOS sharing service. - * - * #### Example - * ```js - * // share a string with the Messages service - * popclip.share("com.apple.share.Messages.window", ["Hello, world!"]); - * // share a URL with the Safari Reading List service - * popclip.share("com.apple.share.System.add-to-safari-reading-list", [{ url: "https://example.com" }]); - * // share a an html string with the Notes service - * const item = new RichString("Some simple html", { format: html }) - * popclip.share("com.apple.Notes.SharingExtension", [item]); - * ``` - * - * #### Notes - * - * The list of available sharing services is determined by the user's system configuration. - * - * @param serviceName The name of the sharing service to use. - * @param items An array of items to share. Each item can be a string, a {@link RichString} object, or an object with a `url` property. - * @throws If the service name is not recognized, or if the service cannot handle the supplied items, an error is thrown. - */ - share: (serviceName: string, items: (string | RichString | { url: string } )[]) => void -} - -/** - * The global `popclip` object encapsulates the user's current interaction with PopClip, and provides methods - * for performing various actions. It implements [[PopClip]]. - */ -declare const popclip: PopClip - -/** - * Represents a formatted text string. The underlying implementation uses a macOS Attributed String (`NSAttributedString`) object. - * Can be constructed from a plain string in RTF, HTML, or Markdown format. - * - * #### Example - * ```js - * // create a RichString object from a html string - * const item = new RichString("bold and italic.", {format: 'html'}); - * // create a RichString object from a markdown string - * const item = new RichString("# Title\n\nBody.", {format: 'markdown'}); - * ``` - */ -declare class RichString { - /** - * Create a new RichString object from a string. - * - * @param source The string to convert to a RichString object. - * @param options Options for the conversion. - */ - constructor (source: string, - options?: { - /** - Format of the source string. Default is 'rtf'. - */ - format?: 'rtf' | 'html' | 'markdown', - } - ); - /** - * An RTF representation of the content. - */ - readonly rtf: string - /** - * An HTML representation of the content. - */ - readonly html: string -} - -/** -* A container for various utility functions and constants [[`util`]] object. -*/ -declare interface Util { - - /** - * Localize an English string into the current user interface language, if possible. - * This will work for strings which match an existing string in PopClip's user interface. - * - * @param string The string to localize. - * @return The localized string, or the original string if no localized version was avaiable. - */ - localize: (string: string) => string - - localeInfo: { - localeIdentifier: string - regionCode: string - languageCode: string - decimalSeparator: string - groupingSeparator: string - currencyCode: string - currencySymbol: string - } - - timeZoneInfo: { - identifier: string - abbreviation: string - secondsOffset: number - daylightSaving: boolean - } - - htmlToRtf: (html: string) => string | undefined - - /** - * Encode a string as UTF-8 then Base-64 encode the result. - * - * @param string The string to encode. - * @param options - */ - base64Encode: (string: string, options?: { - /** - * Whether to encode using the URL-safe variant, with `-` and `_` substituted for `+` and `/`. Default is no. - */ - urlSafe?: boolean - /** - * Whether to trim the `=`/`==` padding from the string. Default is no. - */ - trimmed?: boolean - }) => string - - /** - * Decode a Base-64 string and interpret the result as a UTF-8 string. - * - * Accepts both standard and URL-safe variants as input. Also accepts input with or without the `=`/`==` end padding. - * Throws an error if the input cannot be decoded as a UTF-8 string. - * - * @param string - * @returns The decoded string - */ - base64Decode: (string: string) => string - - /** Build a URL from a base URL and additional query parameters */ - buildQueryUrl: (baseUrl: string, params: {[string]: string}) => string - - /** Build a query from params object */ - buildQuery: (params: {[string]: string}) => string - - /** Parse a query into params object */ - parseQuery: (query: string) => any - - /** Decipher a JSON object that has been lightly obscured to prevent constants such as - * API keys appearing in plaintext in the source files. - * - * This function will ROT13 decipher the text, apply Base64 decoding, and parse the result as JSON. */ - clarify: (obscuredString: string) => any - - // same as global sleep() - sleep: (durationMilliseconds: number) => Promise - - /** - * The `constant` property is a container for pre-defined constants. - */ - readonly constant: { - /** - * Bit mask for the Shift (⇧) key. - */ - readonly MODIFIER_SHIFT: 131072 - /** - * Bit mask for the Control (⌃) key. - */ - readonly MODIFIER_CONTROL: 262144 - /** - * Bit mask for the Option (⌥) key. - */ - readonly MODIFIER_OPTION: 524288 - /** - * Bit mask for the Command (⌘) key. - */ - readonly MODIFIER_COMMAND: 1048576 - /** - * Key code for the Return (↵) key. - */ - readonly KEY_RETURN: 0X24 - /** - * Key code for the Tab (⇥) key. - */ - readonly KEY_TAB: 0X30 - /** - * Key code for the space bar. - */ - readonly KEY_SPACE: 0X31 - /** - * Key code for the Delete (⌫) key. - */ - readonly KEY_DELETE: 0X33 - /** - * Key code for the Escape key. - */ - readonly KEY_ESCAPE: 0X35 - /** - * Key code for the Left Arrow key. - */ - readonly KEY_LEFTARROW: 0X7B - /** - * Key code for the Right Arrow key. - */ - readonly KEY_RIGHTARROW: 0X7C - /** - * Key code for the Down Arrow key. - */ - readonly KEY_DOWNARROW: 0X7D - /** - * Key code for the Up Arrow key. - */ - readonly KEY_UPARROW: 0X7E - } -} - -/** - * The global `util` object acts as a container for various utility functions and constants. It implements [[Util]]. - */ -declare const util: Util - -/** - * Represents the raw pasteboard content, indexed by UTI. Supports string data only. - */ -declare interface PasteboardContent { - 'public.utf8-plain-text'?: string - 'public.html'?: string - 'public.rtf'?: string - [string: string] -} - -/** - * Options for Paste operations. - */ -declare interface PasteOptions { - /** - * Whether to restore the original contents of the pasteboard after the paste - * operation. Default is `false`. - */ - restore?: boolean -} - -/** - * A simplified interface to the macOS pasteboard. Implemented by the global object, [[`pasteboard`]]. - */ -declare interface Pasteboard { - /** - * Get and set the plain text content of the pasteboard. - * - * #### Notes - * This property corresponds with the pasteboard type `public.utf8-plain-text`. - * - * When placing text on the pasteboard this way, PopClip's "Copied" notification will not appear. - * (Typically, scripts should use [[copyText]] instead, so that the user gets the "Copied" notification.) - * - * The value of this property will always be a string. If there is no plain text value on the - * pasteboard, reading this property will give an empty string (`""`). - * - * #### Example - * ```js - * let x = pasteboard.text; - * pasteboard.text = "new text"; - * ``` - */ - text: string - - /** - * Get and set the content of the pasteboard, of the specified types - */ - content: PasteboardContent -} - -/** - * The global `pasteboard` object provides access to the contents of the macOS general pasteboard (i.e. the system clipboard). It implements [[Pasteboard]]. - */ -declare const pasteboard: Pasteboard - -/** - * Output a string for debugging purposes. By default it is not output anywhere, but - * you can configure PopClip to output to the Console app by running the following command in Terminal: - * - * `defaults write com.pilotmoon.popclip EnableExtensionDebug -bool YES` - * - * then Quit and restart PopClip. - * - * #### Example - * ```js - * print("Hello, world!") - * // print: Hello, world! - * print(1, Math.PI, 2/3, ['a','b','c']) - * // print: 1 3.141592653589793 0.6666666666666666 a,b,c - * ``` - * - * @param message One or more values, which will be coerced to strings. Multiple parameters will be separated by a space. - */ -declare function print (...args: any[]): void - -/* - * Export an object for use by another file. - * - * #### Notes - * - * The _define_ function family exports an arbitrary object, which other files can import using [[require]]. - * - * It should be called only once in any file; if it is called more than once, only the - * final call will have any effect. - * - * Partially implements AMD spec: https://github.com/amdjs/amdjs-api/wiki/AMD - * - * Note that using `define()` in your extensions is not recommended. Instead, use [[defineExtension]] or - * `module.exports = ...`. - */ -declare function define (object: object): void -declare function define (factory: () => object): void -declare function define (dependencies: string[], factory: () => object): void -declare function define (id: string, factory: () => object): void -declare function define (id: string, dependencies: string[], factory: () => object): void - -/** - * This global function may be called as an alternative to setting `module.exports` directly. - * The advantage of using `defineExtension()` is that you will automatically get type checking - * and autocomplete for your extension object. - * - * You may define the shape of the extensions's options object by specifying the - * `CustomOptions` generic type parameter. This will enable type checking and autocomplete for - * the `options` parameter in action functions and the population function. - * - * @param extension The extension object to export. - */ -declare function defineExtension (extension: Extension): void - -/* Declare ambient module + exports for CommonJS-style exporting */ -declare const module: { exports: any } -declare const exports: any - -/** - * Import an object from another file. - * - * #### Notes - * - * PopClip's `require()` implementation attempts to import from the following module formats: - * - * - AMD modules, which use `define(...)`. - * - CommonJS modules, which use `module.exports = ...` or `exports.name = ...` - * - TypeScript-compiled ES modules, which use `exports.default = ...` - * - * #### Notes - * - * Paths beginning with `./` or `../` are resolved relative to the the location of the current file. - * - * Otherwise, the path is resolved relative to the extensions's package root. - * If there is no file in the extension, PopClip will look in its internal module repository. - * - * If no file extension is given, PopCLip will try adding the extensions `.js`, `.ts`, `.json` in that order. - * - * TypeScript files are transpiled to JavaScript on the fly. - * - * JSON files are parsed and returned as an object.å - * - * @param file Path to the file to import. - * @return The imported object. - */ -declare function require (file: string): object - -/** - * A promise-based sleep function. Included as a more convenient alternative - * to [[setTimeout]] for performing simple delays. Call as `await sleep(1000)`. - * @param durationMilliseconds How long to sleep in milliseconds - */ -declare function sleep (durationMilliseconds: number): Promise - -/* WebAPI and Node.js Globals - * The following functions and objects are available in PopClip via polyfills. - */ - -/** - * Call a function after a specified time interval. - * - * #### Notes - * - * This is PopClip's own implementation of the standard - * [setTimeout](http://developer.mozilla.org/en-US/docs/Web/API/SetTimeout) function, - * as found in browsers. - * Ordinarily you shouldn't need to use this. It is is mainly included for - * compatibility with libraries that might need it. - * - * @param callback A function to be called after the timer expires. - * @param timeout Timeout in milliseconds. If this parameter is omitted, a value of 0 is used, - * @param args Additional arguments to be passed to the callback function. - * @returns Numeric identifier for the timer which can be passed to [[clearTimeout]] to cancel it. - */ -declare function setTimeout (callback: (...args?: any) => void, timeout?: number, ...args?: any): number - -/** - * Cancels a timeout prevouly created with [[setTimeout]]. - * @param timeoutId Identifier of the timeout to cancel. - */ -declare function clearTimeout (timeoutId: number): void - -// XMLHttpRequest is implemented natively in PopClip; I recommend using axios instead. -declare const XMLHttpRequest; - -// these are from WebAPI, and are implemented with core-js polyfills -declare function btoa (string: string): string -declare function atob (string: string): string -declare const URL -declare const URLSearchParams -declare function structuredClone(value: T): T; - -// this is implemented with 'node-blob` library -declare const Blob - -// Buffer is a node.js object, iplemented with 'buffer' library -declare const Buffer diff --git a/tsconfig.json b/tsconfig.json index f3e26a8d4..eb89631b3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,18 +1,4 @@ { - "typedocOptions": { - "entryPoints": [ - "./popclip.d.ts" - ], - "name": "PopClip JavaScript API Reference", - "out": "./docs", - "disableSources": false, - "sort": [ - "alphabetical" - ], - "excludeExternals": true, - "readme": "README-js.md", - "excludeNotDocumented": true - }, "compilerOptions": { "strict": true, "noImplicitAny": false, @@ -24,7 +10,6 @@ "es2021" ], // we can specify esnext lib due to polyfills in popclip - "skipLibCheck": true, "module": "commonjs", "esModuleInterop": false, "moduleResolution": "node",