@tygo-van-den-hurk/slyde 0.0.2-unstable-90c0ef2.0 → 0.0.2-unstable-e335248.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<picture>
|
|
3
|
-
<source srcset="https://github.com/Tygo-van-den-Hurk/Slyde/blob/
|
|
4
|
-
<img src="https://github.com/Tygo-van-den-Hurk/Slyde/blob/
|
|
3
|
+
<source srcset="https://github.com/Tygo-van-den-Hurk/Slyde/blob/e335248fdbf9e00e0fb5e7573b6dcfe54dedd296/docs/assets/logo-standalone.svg" media="(max-width: 600px)">
|
|
4
|
+
<img src="https://github.com/Tygo-van-den-Hurk/Slyde/blob/e335248fdbf9e00e0fb5e7573b6dcfe54dedd296/docs/assets/logo-with-text.svg" width="50%" alt="the Slyde logo">
|
|
5
5
|
</picture>
|
|
6
6
|
<br>
|
|
7
7
|
<br>
|
|
@@ -26,7 +26,7 @@ Slyde is a program to create professional beautifully animated presentations fro
|
|
|
26
26
|
|
|
27
27
|
This would output the following fully animated presentation:
|
|
28
28
|
|
|
29
|
-
<img src="https://github.com/Tygo-van-den-Hurk/Slyde/blob/
|
|
29
|
+
<img src="https://github.com/Tygo-van-den-Hurk/Slyde/blob/e335248fdbf9e00e0fb5e7573b6dcfe54dedd296/docs/assets/example-presentation.gif" width="100%" alt="An example Slyde presentation based on the previous example XML template">
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
@@ -81,4 +81,4 @@ You can also install Slyde in your path by adding the `--global` flag. You might
|
|
|
81
81
|
|
|
82
82
|
## Licence
|
|
83
83
|
|
|
84
|
-
All files in this repository fall under a [licence](https://github.com/Tygo-van-den-Hurk/Slyde/blob/
|
|
84
|
+
All files in this repository fall under a [licence](https://github.com/Tygo-van-den-Hurk/Slyde/blob/e335248fdbf9e00e0fb5e7573b6dcfe54dedd296/LICENSE).
|
|
@@ -6,7 +6,7 @@ import { Component } from '#lib/core/components/class';
|
|
|
6
6
|
export declare class Table extends Component {
|
|
7
7
|
/** Renders markdown tables, and nothing else. */
|
|
8
8
|
static readonly parser: Marked<string, string>;
|
|
9
|
-
static readonly style
|
|
9
|
+
static readonly style: (id: string) => string;
|
|
10
10
|
render({ children }: Component.RenderArguments): Promise<string>;
|
|
11
11
|
hierarchy(): ReturnType<Component.Interface['hierarchy']>;
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../lib/core/components/blocks/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,qBACa,KAAM,SAAQ,SAAS;IAClC,iDAAiD;IAEjD,gBAAuB,MAAM,yBA0B1B;IAGH,gBAAuB,KAAK,
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../../lib/core/components/blocks/table.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,qBACa,KAAM,SAAQ,SAAS;IAClC,iDAAiD;IAEjD,gBAAuB,MAAM,yBA0B1B;IAGH,gBAAuB,KAAK,GAAI,IAAI,MAAM,KAAG,MAAM,CA8BrB;IAIjB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;IAkBtE,SAAS,IAAI,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;CAGjE"}
|
|
@@ -85,9 +85,9 @@ let Table = (() => {
|
|
|
85
85
|
text: ({ raw }) => raw,
|
|
86
86
|
},
|
|
87
87
|
});
|
|
88
|
-
// eslint-disable-next-line no-inline-comments
|
|
89
|
-
static style = /* CSS */ `
|
|
90
|
-
table {
|
|
88
|
+
// eslint-disable-next-line no-inline-comments
|
|
89
|
+
static style = (id) => /* CSS */ `
|
|
90
|
+
#id table {
|
|
91
91
|
--line-width: calc(var(--unit) / 8);
|
|
92
92
|
--padding-x: calc(var(--unit) * 2);
|
|
93
93
|
--padding-y: calc(var(--unit) / 2);
|
|
@@ -99,37 +99,36 @@ let Table = (() => {
|
|
|
99
99
|
margin: var(--unit) auto;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
th,
|
|
103
|
-
td {
|
|
102
|
+
#id th, #id td {
|
|
104
103
|
padding: var(--padding-y) var(--padding-x);
|
|
105
104
|
border-right: var(--line-width) solid var(--foreground);
|
|
106
105
|
border-bottom: var(--line-width) solid var(--foreground);
|
|
107
106
|
}
|
|
108
107
|
|
|
109
|
-
th {
|
|
108
|
+
#id th {
|
|
110
109
|
text-align: center;
|
|
111
110
|
}
|
|
112
111
|
|
|
113
|
-
th:last-child,
|
|
114
|
-
td:last-child {
|
|
112
|
+
#id th:last-child, #id td:last-child {
|
|
115
113
|
border-right: none;
|
|
116
114
|
}
|
|
117
115
|
|
|
118
|
-
tbody tr:last-child td {
|
|
116
|
+
#id tbody tr:last-child td {
|
|
119
117
|
border-bottom: none;
|
|
120
118
|
}
|
|
121
|
-
|
|
119
|
+
`.replaceAll('#id', `#${id}`);
|
|
122
120
|
async render({ children }) {
|
|
123
121
|
const input = (children?.() ?? '').split('\n');
|
|
124
122
|
const trimmed = input.map((line) => line.trim()).join('\n');
|
|
125
123
|
const table = await Table.parser.parse(trimmed);
|
|
124
|
+
const id = `${this.id}-container`;
|
|
126
125
|
// eslint-disable-next-line no-inline-comments
|
|
127
126
|
return /*HTML*/ `
|
|
128
|
-
<div class="block">
|
|
129
|
-
${table}
|
|
127
|
+
<div class="block" id="${id}">
|
|
130
128
|
<style scoped>
|
|
131
|
-
${Table.style}
|
|
129
|
+
${Table.style(id)}
|
|
132
130
|
</style>
|
|
131
|
+
${table}
|
|
133
132
|
</div>
|
|
134
133
|
`;
|
|
135
134
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../lib/core/components/blocks/table.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;IAEU,KAAK;;4BADjB,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;;;sBACjB,SAAS;;;qBAAjB,SAAQ,WAAS;;;;
|
|
1
|
+
{"version":3,"file":"table.js","sourceRoot":"","sources":["../../../../../lib/core/components/blocks/table.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,MAAM,EAAuB,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;IAEU,KAAK;;4BADjB,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;;;sBACjB,SAAS;;;qBAAjB,SAAQ,WAAS;;;;kCAgEjC,CAAA,KAAA,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAA,CAAC,OAAO;YAEjC,qKAAa,MAAM,6DAelB;YAjFH,6KAuFC;;;;QAtFC,iDAAiD;QACjD,gEAAgE;QACzD,MAAM,CAAU,MAAM,GAAG,IAAI,MAAM,CAAC;YACzC,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE;gBACR,UAAU,EAAE,CAAC,EAAE,GAAG,EAA4B,EAAc,EAAE,CAAC,GAAG;gBAClE,EAAE,EAAE,CAAC,E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C5F,CAAC,CAAC;QAEH,8CAA8C;QACvC,MAAM,CAAU,KAAK,GAAG,CAAC,EAAU,EAAU,EAAE,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BhE,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;QAIvB,KAAK,CAAC,MAAM,CAAC,EAAE,QAAQ,EAA6B;YACzD,MAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC5D,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YAChD,MAAM,EAAE,GAAG,GAAG,IAAI,CAAC,EAAE,YAAY,CAAC;YAElC,8CAA8C;YAC9C,OAAO,QAAQ,CAAC;+BACW,EAAE;;YAErB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;;UAEjB,KAAK;;KAEV,CAAC;QACJ,CAAC;QAED,0FAA0F;QACnF,SAAS;YACd,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACtC,CAAC;;;YAtFU,mDAAK;;;YAAL,uDAAK;;;;;SAAL,KAAK"}
|
package/package.json
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
"name": "@tygo-van-den-hurk/slyde",
|
|
3
3
|
"license": "GPL-3.0-only",
|
|
4
4
|
"description": "Make beautifully animated Slydes and presentations from XML with ease!",
|
|
5
|
-
"homepage": "https://
|
|
5
|
+
"homepage": "https://Slyde.js.org",
|
|
6
6
|
"author": "Tygo van den Hurk",
|
|
7
|
-
"version": "0.0.2-unstable-
|
|
7
|
+
"version": "0.0.2-unstable-e335248.0",
|
|
8
8
|
"private": false,
|
|
9
9
|
"keywords": [
|
|
10
10
|
"cli",
|