@tygo-van-den-hurk/slyde 0.0.2-unstable-c6066bb.0 → 0.0.2-unstable-165e786.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/165e7861d7818a95ef59e5fd8dbec8619f59361f/docs/assets/logo-standalone.svg" media="(max-width: 600px)">
|
|
4
|
+
<img src="https://github.com/Tygo-van-den-Hurk/Slyde/blob/165e7861d7818a95ef59e5fd8dbec8619f59361f/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/165e7861d7818a95ef59e5fd8dbec8619f59361f/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/165e7861d7818a95ef59e5fd8dbec8619f59361f/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
|
|
9
|
+
private static style;
|
|
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;
|
|
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;IAEH,OAAO,CAAC,MAAM,CAAC,KAAK;IAqCP,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,51 +85,52 @@ let Table = (() => {
|
|
|
85
85
|
text: ({ raw }) => raw,
|
|
86
86
|
},
|
|
87
87
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
static style(id) {
|
|
89
|
+
// eslint-disable-next-line no-inline-comments
|
|
90
|
+
return /* CSS */ `
|
|
91
|
+
#id table {
|
|
92
|
+
--line-width: calc(var(--unit) / 8);
|
|
93
|
+
--padding-x: calc(var(--unit) * 2);
|
|
94
|
+
--padding-y: calc(var(--unit) / 2);
|
|
94
95
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
border-collapse: collapse;
|
|
97
|
+
border: none;
|
|
98
|
+
overflow: hidden;
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
margin: var(--unit) auto;
|
|
101
|
+
}
|
|
101
102
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
103
|
+
#id th, #id td {
|
|
104
|
+
padding: var(--padding-y) var(--padding-x);
|
|
105
|
+
border-right: var(--line-width) solid var(--foreground);
|
|
106
|
+
border-bottom: var(--line-width) solid var(--foreground);
|
|
107
|
+
}
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
#id th {
|
|
110
|
+
text-align: center;
|
|
111
|
+
}
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
113
|
+
#id th:last-child, #id td:last-child {
|
|
114
|
+
border-right: none;
|
|
115
|
+
}
|
|
117
116
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
#id tbody tr:last-child td {
|
|
118
|
+
border-bottom: none;
|
|
119
|
+
}
|
|
120
|
+
`.replaceAll('#id', `#${id}`);
|
|
121
|
+
}
|
|
122
122
|
async render({ children }) {
|
|
123
123
|
const input = (children?.() ?? '').split('\n');
|
|
124
124
|
const trimmed = input.map((line) => line.trim()).join('\n');
|
|
125
125
|
const table = await Table.parser.parse(trimmed);
|
|
126
|
+
const id = `${this.id}-container`;
|
|
126
127
|
// eslint-disable-next-line no-inline-comments
|
|
127
128
|
return /*HTML*/ `
|
|
128
|
-
<div class="block">
|
|
129
|
-
${table}
|
|
129
|
+
<div class="block" id="${id}">
|
|
130
130
|
<style scoped>
|
|
131
|
-
${Table.style}
|
|
131
|
+
${Table.style(id)}
|
|
132
132
|
</style>
|
|
133
|
+
${table}
|
|
133
134
|
</div>
|
|
134
135
|
`;
|
|
135
136
|
}
|
|
@@ -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;;;;kCAkEjC,CAAA,KAAA,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAA,CAAC,OAAO;YAEjC,qKAAa,MAAM,
|
|
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;;;;kCAkEjC,CAAA,KAAA,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAA,CAAC,OAAO;YAEjC,qKAAa,MAAM,6DAelB;YAnFH,6KAyFC;;;;QA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
4
|
"description": "Make beautifully animated Slydes and presentations from XML with ease!",
|
|
5
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-165e786.0",
|
|
8
8
|
"private": false,
|
|
9
9
|
"keywords": [
|
|
10
10
|
"cli",
|