@tygo-van-den-hurk/slyde 0.0.2-unstable-b8011f5.0 → 0.0.2-unstable-6128e74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/browser/css/modes/base.d.ts +8 -0
- package/dist/browser/css/modes/base.d.ts.map +1 -0
- package/dist/browser/css/modes/base.js +110 -0
- package/dist/browser/css/modes/base.js.map +1 -0
- package/dist/browser/css/modes/pdf.d.ts +6 -0
- package/dist/browser/css/modes/pdf.d.ts.map +1 -0
- package/dist/browser/css/modes/pdf.js +26 -0
- package/dist/browser/css/modes/pdf.js.map +1 -0
- package/dist/browser/css/modes/presentation.d.ts +8 -0
- package/dist/browser/css/modes/presentation.d.ts.map +1 -0
- package/dist/browser/css/modes/presentation.js +43 -0
- package/dist/browser/css/modes/presentation.js.map +1 -0
- package/dist/browser/css/tw-config.d.ts +6 -0
- package/dist/browser/css/tw-config.d.ts.map +1 -0
- package/dist/browser/css/tw-config.js +34 -0
- package/dist/browser/css/tw-config.js.map +1 -0
- package/dist/browser/{css.d.ts → css/types.d.ts} +2 -10
- package/dist/browser/css/types.d.ts.map +1 -0
- package/dist/browser/css/types.js +2 -0
- package/dist/browser/css/types.js.map +1 -0
- package/dist/browser/html.d.ts +1 -1
- package/dist/browser/html.d.ts.map +1 -1
- package/dist/browser/html.js +16 -8
- package/dist/browser/html.js.map +1 -1
- package/dist/browser/scripts/input-bindings.d.ts +23 -0
- package/dist/browser/scripts/input-bindings.d.ts.map +1 -0
- package/dist/browser/scripts/input-bindings.js +129 -0
- package/dist/browser/scripts/input-bindings.js.map +1 -0
- package/dist/browser/scripts/pdf-mode.d.ts +29 -0
- package/dist/browser/scripts/pdf-mode.d.ts.map +1 -0
- package/dist/browser/scripts/pdf-mode.js +60 -0
- package/dist/browser/scripts/pdf-mode.js.map +1 -0
- package/dist/browser/scripts/slide-control.d.ts +60 -0
- package/dist/browser/scripts/slide-control.d.ts.map +1 -0
- package/dist/browser/scripts/slide-control.js +74 -0
- package/dist/browser/scripts/slide-control.js.map +1 -0
- package/dist/browser/scripts/utils.d.ts +12 -0
- package/dist/browser/scripts/utils.d.ts.map +1 -0
- package/dist/browser/scripts/utils.js +24 -0
- package/dist/browser/scripts/utils.js.map +1 -0
- package/dist/lib/core/render/render.js +1 -1
- package/dist/lib/core/render/render.js.map +1 -1
- package/package.json +1 -1
- package/dist/browser/css.d.ts.map +0 -1
- package/dist/browser/css.js +0 -184
- package/dist/browser/css.js.map +0 -1
- package/dist/browser/index.d.ts +0 -3
- package/dist/browser/index.d.ts.map +0 -1
- package/dist/browser/index.js +0 -5
- package/dist/browser/index.js.map +0 -1
- package/dist/browser/page-logic.browser.d.ts +0 -78
- package/dist/browser/page-logic.browser.d.ts.map +0 -1
- package/dist/browser/page-logic.browser.js +0 -264
- package/dist/browser/page-logic.browser.js.map +0 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Logger } from '#lib/logger';
|
|
2
|
+
import { pdfModeStyle } from '#browser/css/modes/pdf';
|
|
3
|
+
import { presentationModeStyle } from '#browser/css/modes/presentation';
|
|
4
|
+
let script = '"use-strict";\n';
|
|
5
|
+
if (pdfModeStyle.includes('`'))
|
|
6
|
+
throw new Error(`Build mistake: pdfModeStyle cannot include \` char.`);
|
|
7
|
+
script += `const pdfModeStyle = \`${pdfModeStyle}\`;\n`;
|
|
8
|
+
if (presentationModeStyle.includes('`'))
|
|
9
|
+
throw new Error(`Build mistake: presentationModeStyle cannot include \` char.`);
|
|
10
|
+
script += `const presentationModeStyle = \`${presentationModeStyle}\`;\n`;
|
|
11
|
+
/** Checks if the document is supposed to viewed as a PDF. */
|
|
12
|
+
// @ts-expect-error this is intentional, the `.state` property does exist.
|
|
13
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion, @typescript-eslint/no-unsafe-assignment
|
|
14
|
+
export const isPDF = function isPDF(state = isPDF.state ?? false) {
|
|
15
|
+
const ref = isPDF; // eslint-disable-line @typescript-eslint/no-unsafe-type-assertion
|
|
16
|
+
if (ref.state === state)
|
|
17
|
+
return ref.state;
|
|
18
|
+
ref.state = state;
|
|
19
|
+
const styleSheet = document.getElementById('dynamic-style');
|
|
20
|
+
if (!styleSheet)
|
|
21
|
+
throw new Error(`Missing dynamic style sheet.`);
|
|
22
|
+
if (ref.state) {
|
|
23
|
+
Logger.info(`Turning PDF mode on.`);
|
|
24
|
+
styleSheet.textContent = pdfModeStyle;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
Logger.info(`Turning PDF mode off.`);
|
|
28
|
+
styleSheet.textContent = presentationModeStyle;
|
|
29
|
+
}
|
|
30
|
+
return ref.state;
|
|
31
|
+
};
|
|
32
|
+
script += `window.${isPDF.name} = ${isPDF.toString()};\n`;
|
|
33
|
+
/** Toggles PDF mode, triggers on a `slyde:mode:pdf:toggle` event. */
|
|
34
|
+
export const togglePdfMode = function togglePdfMode() {
|
|
35
|
+
window.isPDF(!isPDF.state);
|
|
36
|
+
};
|
|
37
|
+
script += `window.${togglePdfMode.name} = ${togglePdfMode.toString()};\n`;
|
|
38
|
+
script += `window.addEventListener("slyde:mode:pdf:toggle", window.${togglePdfMode.name});\n`;
|
|
39
|
+
/** Toggles PDF mode, triggers on a `slyde:mode:pdf:on` event. */
|
|
40
|
+
export const turnPdfModeOnEventCallback = function turnPdfModeOnEventCallback() {
|
|
41
|
+
window.isPDF(true);
|
|
42
|
+
};
|
|
43
|
+
script += `window.addEventListener("slyde:mode:pdf:on", ${turnPdfModeOnEventCallback.toString()});\n`;
|
|
44
|
+
/** Toggles PDF mode, triggers on a `slyde:mode:pdf:off` event. */
|
|
45
|
+
export const turnPdfModeOffEventCallback = function turnPdfModeOffEventCallback() {
|
|
46
|
+
window.isPDF(false);
|
|
47
|
+
};
|
|
48
|
+
script += `window.addEventListener("slyde:mode:pdf:off", ${turnPdfModeOffEventCallback.toString()});\n`;
|
|
49
|
+
/** The callback to exec when the window loads and we can set the PDF type. */
|
|
50
|
+
export const onWindowPdfModeCallback = function onWindowPdfModeCallback() {
|
|
51
|
+
const params = new URLSearchParams(window.location.search);
|
|
52
|
+
if (params.has('pdf'))
|
|
53
|
+
isPDF(true);
|
|
54
|
+
if (params.has('type', 'pdf'))
|
|
55
|
+
isPDF(true);
|
|
56
|
+
};
|
|
57
|
+
script += `window.addEventListener("load", ${onWindowPdfModeCallback.toString()});\n`;
|
|
58
|
+
/** The JavaScript to inject in relation to PDF mode. */
|
|
59
|
+
export default script; // eslint-disable-line import/no-default-export
|
|
60
|
+
//# sourceMappingURL=pdf-mode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-mode.js","sourceRoot":"","sources":["../../../browser/scripts/pdf-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAExE,IAAI,MAAM,GAAG,iBAAiB,CAAC;AAE/B,IAAI,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;IAC5B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;AACzE,MAAM,IAAI,0BAA0B,YAAY,OAAO,CAAC;AAExD,IAAI,qBAAqB,CAAC,QAAQ,CAAC,GAAG,CAAC;IACrC,MAAM,IAAI,KAAK,CAAC,8DAA8D,CAAC,CAAC;AAClF,MAAM,IAAI,mCAAmC,qBAAqB,OAAO,CAAC;AAO1E,6DAA6D;AAC7D,0EAA0E;AAC1E,gHAAgH;AAChH,MAAM,CAAC,MAAM,KAAK,GAAG,SAAS,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK;IAC9D,MAAM,GAAG,GAAG,KAAsB,CAAC,CAAC,kEAAkE;IAEtG,IAAI,GAAG,CAAC,KAAK,KAAK,KAAK;QAAE,OAAO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AACtB,CAAC,CAAC;AAEF,MAAM,IAAI,iDAAiD,2BAA2B,CAAC,QAAQ,EAAE,MAAM,CAAC;AAExG,8EAA8E;AAC9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,uBAAuB;IACrE,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,IAAI,mCAAmC,uBAAuB,CAAC,QAAQ,EAAE,MAAM,CAAC;AAEtF,wDAAwD;AACxD,eAAe,MAAM,CAAC,CAAC,+CAA+C"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { DeepReadonly } from '#lib/types';
|
|
2
|
+
declare let script: string;
|
|
3
|
+
/**
|
|
4
|
+
* The Regex the Hash will comply with.
|
|
5
|
+
*/
|
|
6
|
+
export declare const regex: RegExp;
|
|
7
|
+
/**
|
|
8
|
+
* Sets the browsers location hash (the `#id` part) to the given index.
|
|
9
|
+
*/
|
|
10
|
+
export declare const setCurrentSlideUrlHash: (index: number) => void;
|
|
11
|
+
/**
|
|
12
|
+
* Gets the browser's location hash and returns the slide index. If `allowMissing` is true,
|
|
13
|
+
* returns `number | undefined` when no slide is found; otherwise, throws an error.
|
|
14
|
+
*
|
|
15
|
+
* **Example**
|
|
16
|
+
* ```TypeScript
|
|
17
|
+
* // throws an error
|
|
18
|
+
* window.location.hash = "#slide-a";
|
|
19
|
+
* getCurrentSlideUrlHash();
|
|
20
|
+
*
|
|
21
|
+
* // returns null
|
|
22
|
+
* window.location.hash = "#slide-a";
|
|
23
|
+
* getCurrentSlideUrlHash({ allowMissing: true });
|
|
24
|
+
*
|
|
25
|
+
* // returns the number 1
|
|
26
|
+
* window.location.hash = "#slide-1";
|
|
27
|
+
* getCurrentSlideUrlHash({ ... });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* Used to control the page's slide index.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getCurrentSlideUrlHash(): number;
|
|
33
|
+
export declare function getCurrentSlideUrlHash({ allowMissing, }: {
|
|
34
|
+
readonly allowMissing: true;
|
|
35
|
+
}): number | null;
|
|
36
|
+
/** Goes to the next slide. */
|
|
37
|
+
export declare const goToNextSlide: () => void;
|
|
38
|
+
declare global {
|
|
39
|
+
interface Window {
|
|
40
|
+
goToNextSlide: typeof goToNextSlide;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Goes to the previous slide. */
|
|
44
|
+
export declare const goToPreviousSlide: () => void;
|
|
45
|
+
declare global {
|
|
46
|
+
interface Window {
|
|
47
|
+
goToPreviousSlide: typeof goToPreviousSlide;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The callback to exec when the window has loaded to ensure that a hash slide is set.
|
|
52
|
+
*/
|
|
53
|
+
export declare const setupUrlHashCallBack: () => void;
|
|
54
|
+
/**
|
|
55
|
+
* Watches for changes in the hash of the URL (the # part), and resets the hash if it is incorrect.
|
|
56
|
+
*/
|
|
57
|
+
export declare const handleUrlHashChange: (event: DeepReadonly<HashChangeEvent>) => void;
|
|
58
|
+
/** The contents of a the slide control script. */
|
|
59
|
+
export default script;
|
|
60
|
+
//# sourceMappingURL=slide-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide-control.d.ts","sourceRoot":"","sources":["../../../browser/scripts/slide-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,QAAA,IAAI,MAAM,QAAoB,CAAC;AAE/B;;GAEG;AACH,eAAO,MAAM,KAAK,QAA4B,CAAC;AAI/C;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAmC,OAAO,MAAM,KAAG,IAErF,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAAC;AACjD,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,GACb,EAAE;IACD,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;CAC7B,GAAG,MAAM,GAAG,IAAI,CAAC;AAqBlB,8BAA8B;AAC9B,eAAO,MAAM,aAAa,QAA6B,IAKtD,CAAC;AAKF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,aAAa,EAAE,OAAO,aAAa,CAAC;KACrC;CACF;AAED,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,QAAiC,IAW9D,CAAC;AAKF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,iBAAiB,EAAE,OAAO,iBAAiB,CAAC;KAC7C;CACF;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,QAAoC,IAGpE,CAAC;AAIF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,YAAY,CAAC,eAAe,CAAC,KACnC,IAWF,CAAC;AAIF,kDAAkD;AAClD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Logger } from '#lib/logger';
|
|
2
|
+
let script = '"use-strict";\n';
|
|
3
|
+
/**
|
|
4
|
+
* The Regex the Hash will comply with.
|
|
5
|
+
*/
|
|
6
|
+
export const regex = /^#slide-(?<slide>\d+)/iu;
|
|
7
|
+
script += `let regex = ${regex.toString()};\n`;
|
|
8
|
+
/**
|
|
9
|
+
* Sets the browsers location hash (the `#id` part) to the given index.
|
|
10
|
+
*/
|
|
11
|
+
export const setCurrentSlideUrlHash = function setCurrentSlideUrlHash(index) {
|
|
12
|
+
window.location.hash = `slide-${index}`;
|
|
13
|
+
};
|
|
14
|
+
script += `${setCurrentSlideUrlHash.toString()};\n`;
|
|
15
|
+
export function getCurrentSlideUrlHash({ allowMissing = false, } = {}) {
|
|
16
|
+
const match = regex.exec(window.location.hash);
|
|
17
|
+
if (!match?.groups) {
|
|
18
|
+
if (allowMissing)
|
|
19
|
+
return null;
|
|
20
|
+
throw new Error(`Expected window.location.hash to be of the form ${regex}, but found ${window.location.hash}.`);
|
|
21
|
+
}
|
|
22
|
+
const { slide } = match.groups;
|
|
23
|
+
return Number.parseInt(slide, 10);
|
|
24
|
+
}
|
|
25
|
+
script += `${getCurrentSlideUrlHash.toString()};\n`;
|
|
26
|
+
/** Goes to the next slide. */
|
|
27
|
+
export const goToNextSlide = function goToNextSlide() {
|
|
28
|
+
const currentSlide = getCurrentSlideUrlHash();
|
|
29
|
+
const nextSlide = currentSlide + 1;
|
|
30
|
+
Logger.info(`Going to the next slide: ${nextSlide}`);
|
|
31
|
+
setCurrentSlideUrlHash(nextSlide);
|
|
32
|
+
};
|
|
33
|
+
script += `window.${goToNextSlide.name} = ${goToNextSlide.toString()};\n`;
|
|
34
|
+
script += `window.addEventListener("slyde:next", window.${goToNextSlide.name});\n`;
|
|
35
|
+
/** Goes to the previous slide. */
|
|
36
|
+
export const goToPreviousSlide = function goToPreviousSlide() {
|
|
37
|
+
const currentSlide = getCurrentSlideUrlHash();
|
|
38
|
+
const previousSlide = currentSlide - 1;
|
|
39
|
+
if (previousSlide < 1) {
|
|
40
|
+
Logger.warn(`At the start of the presentation, cannot go back further.`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
Logger.info(`Going to the previous slide: ${previousSlide}`);
|
|
44
|
+
setCurrentSlideUrlHash(previousSlide);
|
|
45
|
+
};
|
|
46
|
+
script += `window.${goToPreviousSlide.name} = ${goToPreviousSlide.toString()};\n`;
|
|
47
|
+
script += `window.addEventListener("slyde:prev", window.${goToNextSlide.name});\n`;
|
|
48
|
+
/**
|
|
49
|
+
* The callback to exec when the window has loaded to ensure that a hash slide is set.
|
|
50
|
+
*/
|
|
51
|
+
export const setupUrlHashCallBack = function setupUrlHashCallBack() {
|
|
52
|
+
const currentSlide = getCurrentSlideUrlHash({ allowMissing: true });
|
|
53
|
+
if (currentSlide === null)
|
|
54
|
+
setCurrentSlideUrlHash(1);
|
|
55
|
+
};
|
|
56
|
+
script += `window.addEventListener("load", ${setupUrlHashCallBack.toString()});\n`;
|
|
57
|
+
/**
|
|
58
|
+
* Watches for changes in the hash of the URL (the # part), and resets the hash if it is incorrect.
|
|
59
|
+
*/
|
|
60
|
+
export const handleUrlHashChange = function handleUrlHashChange(event) {
|
|
61
|
+
const oldUrl = new URL(event.oldURL);
|
|
62
|
+
const newURL = new URL(event.newURL);
|
|
63
|
+
const match = regex.exec(newURL.hash);
|
|
64
|
+
if (!match?.groups) {
|
|
65
|
+
let message = `The new URL hash: ${newURL.hash} does not have a hash of the right shape: ${regex}.`;
|
|
66
|
+
message += `Resetting it to the old value of ${oldUrl.hash}`;
|
|
67
|
+
Logger.warn(message);
|
|
68
|
+
history.replaceState(null, '', event.oldURL);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
script += `window.addEventListener("hashchange", ${handleUrlHashChange.toString()});\n`;
|
|
72
|
+
/** The contents of a the slide control script. */
|
|
73
|
+
export default script; // eslint-disable-line import/no-default-export
|
|
74
|
+
//# sourceMappingURL=slide-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slide-control.js","sourceRoot":"","sources":["../../../browser/scripts/slide-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,IAAI,MAAM,GAAG,iBAAiB,CAAC;AAE/B;;GAEG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,yBAAyB,CAAC;AAE/C,MAAM,IAAI,eAAe,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,SAAS,sBAAsB,CAAC,KAAa;IACjF,MAAM,CAAC,QA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AM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,IAAI,yCAAyC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC;AAExF,kDAAkD;AAClD,eAAe,MAAM,CAAC,CAAC,+CAA+C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare let script: string;
|
|
2
|
+
/** Toggles between full screen and normal web page mode. */
|
|
3
|
+
export declare const toggleFullScreen: () => void;
|
|
4
|
+
declare global {
|
|
5
|
+
interface Window {
|
|
6
|
+
/** Checks if the document is supposed to viewed as a PDF. */
|
|
7
|
+
toggleFullScreen: typeof toggleFullScreen;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/** The util script tag contents. */
|
|
11
|
+
export default script;
|
|
12
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../browser/scripts/utils.ts"],"names":[],"mappings":"AAEA,QAAA,IAAI,MAAM,QAAkB,CAAC;AAE7B,4DAA4D;AAC5D,eAAO,MAAM,gBAAgB,QAAgC,IAe5D,CAAC;AAIF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,6DAA6D;QAC7D,gBAAgB,EAAE,OAAO,gBAAgB,CAAC;KAC3C;CACF;AAED,oCAAoC;AACpC,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Logger } from '#lib/logger';
|
|
2
|
+
let script = '"use-strict";';
|
|
3
|
+
/** Toggles between full screen and normal web page mode. */
|
|
4
|
+
export const toggleFullScreen = function toggleFullScreen() {
|
|
5
|
+
if (document.fullscreenElement) {
|
|
6
|
+
document.exitFullscreen().catch((error) => {
|
|
7
|
+
Logger.error(error);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
document.documentElement
|
|
12
|
+
.requestFullscreen()
|
|
13
|
+
.then(() => {
|
|
14
|
+
Logger.info('Received full screen permissions, press `ESC` to exit.');
|
|
15
|
+
})
|
|
16
|
+
.catch((error) => {
|
|
17
|
+
Logger.error(error);
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
script += `window.${toggleFullScreen.name} = ${toggleFullScreen.toString()};\n`;
|
|
22
|
+
/** The util script tag contents. */
|
|
23
|
+
export default script; // eslint-disable-line import/no-default-export
|
|
24
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../browser/scripts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,IAAI,MAAM,GAAG,eAAe,CAAC;AAE7B,4DAA4D;AAC5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,gBAAgB;IACvD,IAAI,QAAQ,CAAC,iBAAiB,EAAE,CAAC;QAC/B,QAAQ,CAAC,cAAc,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACjD,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACL,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,eAAe;aACrB,iBAAiB,EAAE;aACnB,IAAI,CAAC,GAAG,EAAE;YACT,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAC;QACxE,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;YACxB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;IACP,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,IAAI,UAAU,gBAAgB,CAAC,IAAI,MAAM,gBAAgB,CAAC,QAAQ,EAAE,KAAK,CAAC;AAShF,oCAAoC;AACpC,eAAe,MAAM,CAAC,CAAC,+CAA+C"}
|
|
@@ -3,7 +3,7 @@ import { Globals } from '#lib/core/render/types';
|
|
|
3
3
|
import { createComponentInstance, getMarkupRenderer, wrapper } from '#lib/core/render/utils';
|
|
4
4
|
import { Component } from '#lib/core/components/class';
|
|
5
5
|
import { Logger } from '#lib/logger';
|
|
6
|
-
import { htmlDocument } from '#browser/
|
|
6
|
+
import { htmlDocument } from '#browser/html';
|
|
7
7
|
import { useProcessingInstruction } from '#lib/core/render/processing-instructions';
|
|
8
8
|
/** Handles an XML DocType in the document, by checking if the document mentions the compiler. */
|
|
9
9
|
export const handleDocType = function handleDocType(node) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../lib/core/render/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAoB,MAAM,wBAAwB,CAAC;AASnE,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../lib/core/render/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAoB,MAAM,wBAAwB,CAAC;AASnE,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,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P,WAAW;QACX,UAAU;QACV,IAAI;QACJ,QAAQ;QACR,KAAK;QACL,OAAO;QACP,SAAS;QACT,IAAI;KACL,CAAC,CAAC;AACL,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Make beautifully animated Slydes and presentations from XML with ease!",
|
|
5
5
|
"homepage": "https://Tygo-van-den-Hurk.github.io/Slyde",
|
|
6
6
|
"author": "Tygo van den Hurk",
|
|
7
|
-
"version": "0.0.2-unstable-
|
|
7
|
+
"version": "0.0.2-unstable-6128e74.0",
|
|
8
8
|
"private": false,
|
|
9
9
|
"keywords": [
|
|
10
10
|
"cli",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.d.ts","sourceRoot":"","sources":["../../browser/css.ts"],"names":[],"mappings":"AAEA,0DAA0D;AAC1D,MAAM,WAAW,8BAA8B;IAC7C,2CAA2C;IAC3C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qFAAqF;IACrF,QAAQ,CAAC,IAAI,EAAE;QACb,6CAA6C;QAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;QACxB,6CAA6C;QAC7C,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;KACxB,CAAC;CACH;AAED,8CAA8C;AAC9C,eAAO,MAAM,cAAc,GAA2B,iDAKnD,8BAA8B,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;CAoCnF,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,YAAY,QAA4B,MAUpD,CAAC;AA4IF,sEAAsE;AACtE,eAAO,MAAM,OAAO,GAAoB,MAAM,8BAA8B,KAAG,MAY9E,CAAC"}
|
package/dist/browser/css.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { Component } from '#lib/core/components/class';
|
|
2
|
-
/** The config for tailwind in the browser. */
|
|
3
|
-
export const tailwindConfig = function tailwindConfig({ background, foreground, secondary, primary, }) {
|
|
4
|
-
return {
|
|
5
|
-
theme: {
|
|
6
|
-
/**
|
|
7
|
-
* Allow **only** these colors.
|
|
8
|
-
*/
|
|
9
|
-
colors: { background, foreground, primary, secondary },
|
|
10
|
-
/**
|
|
11
|
-
* Extend the tailwind config with these options.
|
|
12
|
-
*/
|
|
13
|
-
extend: {},
|
|
14
|
-
/** The different font sizes */
|
|
15
|
-
fontSize: {
|
|
16
|
-
'2xl': 'calc(var(--font-size) * 2.50)',
|
|
17
|
-
'2xs': 'calc(var(--font-size) * 0.25)',
|
|
18
|
-
'3xl': 'calc(var(--font-size) * 3.00)',
|
|
19
|
-
'4xl': 'calc(var(--font-size) * 3.50)',
|
|
20
|
-
'5xl': 'calc(var(--font-size) * 4.00)',
|
|
21
|
-
base: 'calc(var(--font-size) * 1.00)',
|
|
22
|
-
lg: 'calc(var(--font-size) * 1.50)',
|
|
23
|
-
sm: 'calc(var(--font-size) * 0.75)',
|
|
24
|
-
xl: 'calc(var(--font-size) * 2.00)',
|
|
25
|
-
xs: 'calc(var(--font-size) * 0.50)',
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* Allow **only** the scale of `--unit` which is the unit of measurement in a slyde HTML document as it changes
|
|
29
|
-
* based on the size of the document. All other measurements don't.
|
|
30
|
-
*/
|
|
31
|
-
spacing: Object.fromEntries(Array.from({ length: 1000 }, (_ignore, amount) => [amount, `calc(${amount} * var(--unit))`])),
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
/** Returns a base Tailwind CSS style block that sets default styles. */
|
|
36
|
-
export const baseTailwind = function baseTailwind() {
|
|
37
|
-
// eslint-disable-next-line no-inline-comments
|
|
38
|
-
return /*HTML*/ `
|
|
39
|
-
<style type="text/tailwindcss">
|
|
40
|
-
@layer base {
|
|
41
|
-
a { @apply text-secondary; }
|
|
42
|
-
a:hover { @apply underline; }
|
|
43
|
-
}
|
|
44
|
-
</style>
|
|
45
|
-
`;
|
|
46
|
-
};
|
|
47
|
-
// eslint-disable-next-line no-inline-comments
|
|
48
|
-
const htmlConfig = /*CSS*/ `
|
|
49
|
-
html {
|
|
50
|
-
height: 100vh;
|
|
51
|
-
width: 100vw;
|
|
52
|
-
margin: 0;
|
|
53
|
-
padding: 0;
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
align-items: center;
|
|
57
|
-
background-color: black;
|
|
58
|
-
font-family: "DejaVu Sans", sans-serif !important;
|
|
59
|
-
}
|
|
60
|
-
`;
|
|
61
|
-
// eslint-disable-next-line no-inline-comments
|
|
62
|
-
const nothingSelectable = /*CSS*/ `
|
|
63
|
-
* {
|
|
64
|
-
user-select: none;
|
|
65
|
-
-webkit-user-select: none;
|
|
66
|
-
-moz-user-select: none;
|
|
67
|
-
-ms-user-select: none;
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
// eslint-disable-next-line no-inline-comments
|
|
71
|
-
const noScrollBars = /*CSS*/ `
|
|
72
|
-
* {
|
|
73
|
-
scrollbar-width: none;
|
|
74
|
-
-ms-overflow-style: none;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
*::-webkit-scrollbar {
|
|
78
|
-
display: none;
|
|
79
|
-
}
|
|
80
|
-
`;
|
|
81
|
-
// eslint-disable-next-line no-inline-comments
|
|
82
|
-
const doNotDisplayListCss = /*CSS*/ `
|
|
83
|
-
head, style, script {
|
|
84
|
-
display: none !important;
|
|
85
|
-
}
|
|
86
|
-
`;
|
|
87
|
-
// eslint-disable-next-line no-inline-comments
|
|
88
|
-
const latexLibStyling = /*CSS*/ `
|
|
89
|
-
mjx-container {
|
|
90
|
-
display: inline-block;
|
|
91
|
-
vertical-align: middle;
|
|
92
|
-
}
|
|
93
|
-
`;
|
|
94
|
-
const setVarsBodyCss = function setVarsBodyCss({ background, foreground, primary, secondary, size, }) {
|
|
95
|
-
// eslint-disable-next-line no-inline-comments
|
|
96
|
-
return /*CSS*/ `
|
|
97
|
-
/*
|
|
98
|
-
!!!! Any changes to this function are very much breaking changes !!!!
|
|
99
|
-
*/
|
|
100
|
-
body {
|
|
101
|
-
--width: ${size.width} !important;
|
|
102
|
-
--height: ${size.height} !important;
|
|
103
|
-
--foreground: ${foreground} !important;
|
|
104
|
-
--background: ${background} !important;
|
|
105
|
-
--secondary: ${secondary} !important;
|
|
106
|
-
--primary: ${primary} !important;
|
|
107
|
-
}
|
|
108
|
-
`;
|
|
109
|
-
};
|
|
110
|
-
const fontSize = 1;
|
|
111
|
-
// eslint-disable-next-line no-inline-comments
|
|
112
|
-
const bodyCss = /*CSS*/ `
|
|
113
|
-
/* CSS to always apply to the body */
|
|
114
|
-
body {
|
|
115
|
-
color: var(--foreground);
|
|
116
|
-
position: relative;
|
|
117
|
-
|
|
118
|
-
--unit: min(
|
|
119
|
-
(min(100vw, calc(100vh * var(--width) / var(--height))) / var(--width)),
|
|
120
|
-
(min(100vh, calc(100vw * var(--height) / var(--width))) / var(--height)),
|
|
121
|
-
) !important;
|
|
122
|
-
|
|
123
|
-
container-name: document;
|
|
124
|
-
container-type: size;
|
|
125
|
-
width: calc(var(--width) * var(--unit));
|
|
126
|
-
|
|
127
|
-
/* This is not perfect, it needs some more min-max-math-ing */
|
|
128
|
-
--font-size: min(
|
|
129
|
-
${fontSize} * 1vw * (100 / var(--width)),
|
|
130
|
-
100vh * (${fontSize} / var(--height))
|
|
131
|
-
) !important;
|
|
132
|
-
font-size: var(--font-size);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
body:not(.pdf) {
|
|
136
|
-
overflow: hidden;
|
|
137
|
-
aspect-ratio: var(--width) / var(--height);
|
|
138
|
-
height: min(100vh, calc(100vw * var(--height) / var(--width)));
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
body.pdf {
|
|
142
|
-
overflow-x: scroll;
|
|
143
|
-
height: 100vh;
|
|
144
|
-
}
|
|
145
|
-
`;
|
|
146
|
-
// eslint-disable-next-line no-inline-comments
|
|
147
|
-
const slideCss = /*CSS*/ `
|
|
148
|
-
|
|
149
|
-
body slyde-component[level="${Component.level.slide}"] {
|
|
150
|
-
display: block;
|
|
151
|
-
background-color: var(--background);
|
|
152
|
-
margin-bottom: var(--unit);
|
|
153
|
-
width: 100%;
|
|
154
|
-
aspect-ratio: var(--width) / var(--height);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
body:not(.pdf) slyde-component[level="${Component.level.slide}"] {
|
|
158
|
-
display: none;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* Move to a separate style element later to allow JS to alter it. */
|
|
162
|
-
body:not(.pdf) slyde-component[level="${Component.level.slide}"]:first-of-type {
|
|
163
|
-
display: block;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
body slyde-component[level="${Component.level.slide}"]:last-child {
|
|
167
|
-
margin-bottom: 0;
|
|
168
|
-
}
|
|
169
|
-
`;
|
|
170
|
-
/** The only part of the CSS that cannot be done using TailWindCss. */
|
|
171
|
-
export const baseCSS = function baseCSS(args) {
|
|
172
|
-
// eslint-disable-next-line no-inline-comments
|
|
173
|
-
return /*CSS*/ `
|
|
174
|
-
${htmlConfig}
|
|
175
|
-
${nothingSelectable}
|
|
176
|
-
${noScrollBars}
|
|
177
|
-
${doNotDisplayListCss}
|
|
178
|
-
${latexLibStyling}
|
|
179
|
-
${setVarsBodyCss(args)}
|
|
180
|
-
${bodyCss}
|
|
181
|
-
${slideCss}
|
|
182
|
-
`;
|
|
183
|
-
};
|
|
184
|
-
//# sourceMappingURL=css.js.map
|
package/dist/browser/css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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file":"index.d.ts","sourceRoot":"","sources":["../../browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
package/dist/browser/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../browser/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAE9B,WAAW;AACX,wCAAwC"}
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { DeepReadonly } from '#lib/types';
|
|
2
|
-
/** Checks if the document is supposed to viewed as a PDF. */
|
|
3
|
-
export declare const isPDF: () => boolean;
|
|
4
|
-
/** Adds enables the stacked layout in the body. */
|
|
5
|
-
export declare const setStackedLayout: () => void;
|
|
6
|
-
/**
|
|
7
|
-
* The Regex the Hash will comply with.
|
|
8
|
-
*/
|
|
9
|
-
export declare const regex: RegExp;
|
|
10
|
-
/**
|
|
11
|
-
* Sets the browsers location hash (the `#id` part) to the given index.
|
|
12
|
-
*/
|
|
13
|
-
export declare const setCurrentSlideUrlHash: (index: number) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Gets the browser's location hash and returns the slide index. If `allowMissing` is true,
|
|
16
|
-
* returns `number | undefined` when no slide is found; otherwise, throws an error.
|
|
17
|
-
*
|
|
18
|
-
* **Example**
|
|
19
|
-
* ```TypeScript
|
|
20
|
-
* // throws an error
|
|
21
|
-
* window.location.hash = "#slide-a";
|
|
22
|
-
* getCurrentSlideUrlHash();
|
|
23
|
-
*
|
|
24
|
-
* // returns null
|
|
25
|
-
* window.location.hash = "#slide-a";
|
|
26
|
-
* getCurrentSlideUrlHash({ allowMissing: true });
|
|
27
|
-
*
|
|
28
|
-
* // returns the number 1
|
|
29
|
-
* window.location.hash = "#slide-1";
|
|
30
|
-
* getCurrentSlideUrlHash({ ... });
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* Used to control the page's slide index.
|
|
34
|
-
*/
|
|
35
|
-
export declare function getCurrentSlideUrlHash(): number;
|
|
36
|
-
export declare function getCurrentSlideUrlHash({ allowMissing, }: {
|
|
37
|
-
readonly allowMissing: true;
|
|
38
|
-
}): number | null;
|
|
39
|
-
/** Goes to the next slide. */
|
|
40
|
-
export declare const goToNextSlide: () => void;
|
|
41
|
-
/** Goes to the previous slide. */
|
|
42
|
-
export declare const goToPreviousSlide: () => void;
|
|
43
|
-
/**
|
|
44
|
-
* Watches for changes in the hash of the URL (the # part), and resets the hash if it is incorrect.
|
|
45
|
-
*/
|
|
46
|
-
export declare const handleUrlHashChange: (event: DeepReadonly<HashChangeEvent>) => void;
|
|
47
|
-
/** Handles mouse presses on the document, and moves slides accordingly. */
|
|
48
|
-
export declare const handleMousePresses: (event: MouseEvent) => void;
|
|
49
|
-
/** Toggles between full screen and normal web page mode. */
|
|
50
|
-
export declare const toggleFullScreen: () => void;
|
|
51
|
-
/** Gets the size of one `--unit` in pixels. */
|
|
52
|
-
export declare const getOneUnitSizeInPixels: () => number;
|
|
53
|
-
interface scrollUsingUnitArgs {
|
|
54
|
-
readonly amount: number;
|
|
55
|
-
/** Wether to move down that many slides instead of units. */
|
|
56
|
-
readonly slides?: boolean;
|
|
57
|
-
}
|
|
58
|
-
/** Scrolls the window down by `amount * --unit` in pixels. */
|
|
59
|
-
export declare const scrollUsingUnit: ({ amount, slides, }: scrollUsingUnitArgs) => void;
|
|
60
|
-
/** Handles key presses on the document, and moves slides accordingly. */
|
|
61
|
-
export declare const handleKeyPresses: (event: KeyboardEvent) => void;
|
|
62
|
-
/** Handles scrolling through on the document, and moves slides accordingly. */
|
|
63
|
-
export declare const handleScrollEvents: (event: WheelEvent) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Handles touch events the screen. Goes to the next slide, when tapping the right half,
|
|
66
|
-
* and the previous slide when tapping the left half of the screen.
|
|
67
|
-
*/
|
|
68
|
-
export declare const handleTouchEvents: (event: TouchEvent) => void;
|
|
69
|
-
/** Hides mouse cursor when its not moving, shows the mouse cursor when it is. */
|
|
70
|
-
export declare const handleMouseMove: () => void;
|
|
71
|
-
/** Prevents context menus from showing up when right clicking. */
|
|
72
|
-
export declare const handleContextMenus: (event: MouseEvent) => void;
|
|
73
|
-
/** Adds a bunch of events listeners as setup. */
|
|
74
|
-
export declare const addEventListeners: () => void;
|
|
75
|
-
/** The full setup code to run when first opening the document */
|
|
76
|
-
export declare const setupScriptCode: string;
|
|
77
|
-
export {};
|
|
78
|
-
//# sourceMappingURL=page-logic.browser.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-logic.browser.d.ts","sourceRoot":"","sources":["../../browser/page-logic.browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,6DAA6D;AAC7D,eAAO,MAAM,KAAK,QAAqB,OAItC,CAAC;AAEF,mDAAmD;AACnD,eAAO,MAAM,gBAAgB,QAAgC,IAI5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,QAA4B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAmC,OAAO,MAAM,KAAG,IAErF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAAC;AACjD,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,GACb,EAAE;IACD,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;CAC7B,GAAG,MAAM,GAAG,IAAI,CAAC;AAmBlB,8BAA8B;AAC9B,eAAO,MAAM,aAAa,QAA6B,IAKtD,CAAC;AAEF,kCAAkC;AAClC,eAAO,MAAM,iBAAiB,QAAiC,IAW9D,CAAC;AAUF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,YAAY,CAAC,eAAe,CAAC,KACnC,IAcF,CAAC;AAEF,2EAA2E;AAE3E,eAAO,MAAM,kBAAkB,GAA+B,OAA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