@dodona/papyros 0.1.37 → 0.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CodeEditor.d.ts +10 -2
- package/dist/Constants.d.ts +1 -0
- package/dist/InputManager.d.ts +3 -2
- package/dist/OutputManager.d.ts +5 -2
- package/dist/Papyros.d.ts +13 -5
- package/dist/StatusPanel.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/inputServiceWorker.js +1 -1
- package/dist/util/Util.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Papyros=t():e.Papyros=t()}(self,(function(){return(()=>{const e=location.
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Papyros=t():e.Papyros=t()}(self,(function(){return(()=>{const e=location.href.replace("inputServiceWorker.js",""),t={input:""};function n(e){return new Promise((t=>setTimeout(t,e)))}return addEventListener("fetch",(function(s){const i=s.request.url;let o;i.includes(e)?i.includes("__papyros_input")?"GET"===s.request.method?o=async function(){for(;!t.input;)await n(1e3);const e=Promise.resolve(new Response(t.input));return t.input="",e}():"POST"===s.request.method&&(o=s.request.json().then((e=>(t.input=e.input,new Response("input stored: "+t.input))))):o=fetch(s.request).then((e=>{const t=new Headers(e.headers);return t.set("Cross-Origin-Embedder-Policy","require-corp"),t.set("Cross-Origin-Opener-Policy","same-origin"),t.set("Cross-Origin-Resource-Policy","cross-origin"),new Response(e.body,{status:e.status||200,statusText:e.statusText,headers:t})})):o=fetch(s.request),s.respondWith(o)})),addEventListener("install",(function(e){e.waitUntil(skipWaiting())})),addEventListener("activate",(function(e){e.waitUntil(clients.claim())})),{}})()}));
|
package/dist/util/Util.d.ts
CHANGED
|
@@ -6,3 +6,10 @@ export declare function getSelectOptions<T>(options: Array<T>, optionText: (opti
|
|
|
6
6
|
export declare function renderSelect<T>(selectId: string, options: Array<T>, optionText: (option: T) => string, selected?: T, labelText?: string): string;
|
|
7
7
|
export declare function addListener<T extends string>(elementId: string, onEvent: (e: T) => void, eventType?: string, attribute?: string): void;
|
|
8
8
|
export declare function removeSelection(selectId: string): void;
|
|
9
|
+
export interface RenderOptions {
|
|
10
|
+
parentElementId: string;
|
|
11
|
+
classNames?: string;
|
|
12
|
+
attributes?: Map<string, string>;
|
|
13
|
+
}
|
|
14
|
+
export declare function getElement(element: string | HTMLElement): HTMLElement;
|
|
15
|
+
export declare function renderWithOptions(options: RenderOptions, content: string | HTMLElement): HTMLElement;
|