@stanko/ctrls 0.1.1 → 0.1.3
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 +10 -9
- package/dist/ctrls/ctrl-radio.d.ts +1 -0
- package/dist/ctrls/ctrl-radio.js +4 -1
- package/dist/ctrls/index.d.ts +3 -0
- package/dist/ctrls/index.js +18 -2
- package/dist/ctrls.css +36 -9
- package/dist/ctrls.css.map +1 -1
- package/dist/utils/get-random-string.d.ts +1 -0
- package/dist/utils/get-random-string.js +5 -0
- package/package.json +4 -3
- package/public/ctrls-ratio-2-perspective.png +0 -0
- package/public/ctrls-ratio-2.png +0 -0
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Minimal library for controlling parameters, designed specifically for algorithmi
|
|
|
8
8
|
|
|
9
9
|
I built Ctrls for my [algorithmic art projects](https://muffinman.io/art/). By default, the state is saved in the URL, which lets you navigate history and share links easily. Along with standard components like checkboxes and ranges, it includes two especially useful for generative work: RNG seed and easing. These not only let you adjust parameters but also expose functions (rng and easing) you can call directly.
|
|
10
10
|
|
|
11
|
-
Play with the live example above or check the older version in my [Space Invaders generator](https://muffinman.io/invaders/)
|
|
11
|
+
Play with the live example above or check the older version in my [Space Invaders generator](https://muffinman.io/invaders/).
|
|
12
12
|
|
|
13
13
|
## Features
|
|
14
14
|
|
|
@@ -103,14 +103,15 @@ type ControlsOptions = {
|
|
|
103
103
|
showRandomizeButton?: boolean; // default: true
|
|
104
104
|
storage?: "hash" | "none"; // default: "hash"
|
|
105
105
|
theme?: "system" | "light" | "dark"; // default: "system"
|
|
106
|
+
parent?: Element; // element to append Ctrls' element to
|
|
107
|
+
title?: string; // it will be rendered as a button which toggles the controls visibility
|
|
106
108
|
};
|
|
107
109
|
```
|
|
108
110
|
|
|
109
111
|
Public API:
|
|
110
112
|
|
|
111
113
|
```ts
|
|
112
|
-
// The main Ctrls element
|
|
113
|
-
// document.querySelector('.my-controls').appendChild(options.element);
|
|
114
|
+
// The main Ctrls element
|
|
114
115
|
.element: HTMLDivElement
|
|
115
116
|
|
|
116
117
|
// Change handler called whenever any of the values is changed.
|
|
@@ -145,7 +146,7 @@ All controls share the following properties:
|
|
|
145
146
|
label?: string;
|
|
146
147
|
// Depends on the control type, the default value for the control
|
|
147
148
|
defaultValue?: T;
|
|
148
|
-
//
|
|
149
|
+
// Disabled the value randomization (via randomize method or button)
|
|
149
150
|
isRandomizationDisabled?: boolean; // default: false
|
|
150
151
|
}
|
|
151
152
|
```
|
|
@@ -372,14 +373,14 @@ Thank you for stopping by! If you end up using Ctrls, please let me know, I woul
|
|
|
372
373
|
|
|
373
374
|
## TODO
|
|
374
375
|
|
|
375
|
-
* [ ] Demo - favicon and metadata
|
|
376
|
-
* [ ] Readme - screenshots
|
|
377
|
-
* [ ] Prefix input names' with `ctrl_${id}_${name}` to avoid collisions
|
|
378
376
|
* [ ] Allow users to pass a custom PRNG lib
|
|
379
377
|
* [ ] Hash storage - check if there is an instance using hash storage already
|
|
380
|
-
* [
|
|
381
|
-
* [ ] Add title which collapses the controls
|
|
378
|
+
* [x] Add title which collapses the controls
|
|
382
379
|
* [ ] Storage - local storage
|
|
380
|
+
* [x] Prefix input names' with `ctrl_${id}_${name}` to avoid collisions
|
|
381
|
+
* [x] Demo - stop animation when not in viewport
|
|
382
|
+
* [x] Demo - favicon and metadata
|
|
383
|
+
* [x] Readme - screenshots
|
|
383
384
|
* [x] Use web safe / system fonts by default
|
|
384
385
|
* [x] Experiment with chroma for light and dark shades of the main color
|
|
385
386
|
* [x] On input event / handler
|
|
@@ -17,6 +17,7 @@ export declare class RadioCtrl implements Ctrl<string> {
|
|
|
17
17
|
items: Option[];
|
|
18
18
|
element: HTMLElement;
|
|
19
19
|
columns: 1 | 2 | 3 | 4 | 5;
|
|
20
|
+
id: string;
|
|
20
21
|
constructor(config: CtrlTypeRegistry["radio"]["config"], onChange: CtrlChangeHandler<string>, onInput: CtrlChangeHandler<string>);
|
|
21
22
|
parse: (string: string) => string;
|
|
22
23
|
getRandomValue: () => string;
|
package/dist/ctrls/ctrl-radio.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import random from "../utils/random";
|
|
2
|
+
import { toKebabCase } from "../utils/string-utils";
|
|
3
|
+
import { getRandomString } from "../utils/get-random-string";
|
|
2
4
|
export class RadioCtrl {
|
|
3
5
|
constructor(config, onChange, onInput) {
|
|
4
6
|
this.type = "radio";
|
|
@@ -21,7 +23,7 @@ export class RadioCtrl {
|
|
|
21
23
|
const inputs = items.map((item) => {
|
|
22
24
|
const input = document.createElement("input");
|
|
23
25
|
input.setAttribute("type", "radio");
|
|
24
|
-
input.setAttribute("name", this.
|
|
26
|
+
input.setAttribute("name", this.id);
|
|
25
27
|
input.setAttribute("value", item.value);
|
|
26
28
|
input.checked = item.value === value;
|
|
27
29
|
input.addEventListener("change", () => {
|
|
@@ -75,6 +77,7 @@ export class RadioCtrl {
|
|
|
75
77
|
this.columns = config.columns || 3;
|
|
76
78
|
this.name = config.name;
|
|
77
79
|
this.label = config.label || config.name;
|
|
80
|
+
this.id = `ctrls-${getRandomString()}-${toKebabCase(this.name)}`;
|
|
78
81
|
const defaultValue = this.items.find((item) => item.value === config.defaultValue);
|
|
79
82
|
this.value = defaultValue?.value || this.getDefaultValue();
|
|
80
83
|
this.isRandomizationDisabled = config.isRandomizationDisabled || false;
|
package/dist/ctrls/index.d.ts
CHANGED
|
@@ -94,6 +94,8 @@ type ControlsOptions = {
|
|
|
94
94
|
showRandomizeButton?: boolean;
|
|
95
95
|
storage?: "hash" | "none";
|
|
96
96
|
theme?: "system" | "light" | "dark";
|
|
97
|
+
parent?: Element;
|
|
98
|
+
title?: string;
|
|
97
99
|
};
|
|
98
100
|
export declare class Ctrls<Configs extends readonly TypedControlConfig[]> {
|
|
99
101
|
options: ControlsOptions;
|
|
@@ -104,6 +106,7 @@ export declare class Ctrls<Configs extends readonly TypedControlConfig[]> {
|
|
|
104
106
|
onInput?: (updatedValues: Partial<ReturnType<typeof this.getValues>>) => void;
|
|
105
107
|
constructor(controls: Configs, options?: ControlsOptions);
|
|
106
108
|
buildUI: () => HTMLDivElement;
|
|
109
|
+
toggleVisibility: () => void;
|
|
107
110
|
addHashListeners: () => void;
|
|
108
111
|
getHash: () => string;
|
|
109
112
|
setHash: () => void;
|
package/dist/ctrls/index.js
CHANGED
|
@@ -23,18 +23,31 @@ export class Ctrls {
|
|
|
23
23
|
const element = document.createElement("div");
|
|
24
24
|
element.classList.add("ctrls");
|
|
25
25
|
element.classList.add(`ctrls--${this.options.theme}-theme`);
|
|
26
|
+
const controlsContainer = document.createElement("div");
|
|
27
|
+
controlsContainer.classList.add("ctrls__controls");
|
|
26
28
|
this.controls.forEach((control) => {
|
|
27
|
-
|
|
29
|
+
controlsContainer.appendChild(control.element);
|
|
28
30
|
});
|
|
29
31
|
if (this.options.showRandomizeButton) {
|
|
30
32
|
const randomizeButton = document.createElement("button");
|
|
31
33
|
randomizeButton.classList.add("ctrls__randomize", "ctrls__btn", "ctrls__btn--lg");
|
|
32
34
|
randomizeButton.innerHTML = `Randomize ${diceIcon}`;
|
|
33
35
|
randomizeButton.addEventListener("click", this.randomize);
|
|
34
|
-
|
|
36
|
+
controlsContainer.appendChild(randomizeButton);
|
|
35
37
|
}
|
|
38
|
+
if (this.options.title) {
|
|
39
|
+
const titleButton = document.createElement("button");
|
|
40
|
+
titleButton.classList.add("ctrls__title");
|
|
41
|
+
titleButton.innerText = this.options.title;
|
|
42
|
+
titleButton.addEventListener("click", this.toggleVisibility);
|
|
43
|
+
element.appendChild(titleButton);
|
|
44
|
+
}
|
|
45
|
+
element.appendChild(controlsContainer);
|
|
36
46
|
return element;
|
|
37
47
|
};
|
|
48
|
+
this.toggleVisibility = () => {
|
|
49
|
+
this.element.classList.toggle("ctrls--hidden");
|
|
50
|
+
};
|
|
38
51
|
this.addHashListeners = () => {
|
|
39
52
|
window.addEventListener("hashchange", this.updateFromHash);
|
|
40
53
|
// Update all inputs using initial values from the hash
|
|
@@ -141,6 +154,9 @@ export class Ctrls {
|
|
|
141
154
|
if (this.options.storage === "hash") {
|
|
142
155
|
this.addHashListeners();
|
|
143
156
|
}
|
|
157
|
+
if (this.options.parent) {
|
|
158
|
+
this.options.parent.appendChild(this.element);
|
|
159
|
+
}
|
|
144
160
|
}
|
|
145
161
|
getValues() {
|
|
146
162
|
const options = {};
|
package/dist/ctrls.css
CHANGED
|
@@ -277,15 +277,10 @@
|
|
|
277
277
|
color: var(--ctrls-text);
|
|
278
278
|
border-radius: min(var(--ctrls-radius) + 8px, 24px);
|
|
279
279
|
border: 1px solid var(--ctrls-border);
|
|
280
|
-
padding: 0.5rem;
|
|
281
|
-
display: grid;
|
|
282
|
-
gap: 0.5rem;
|
|
283
280
|
background-color: var(--ctrls-bg);
|
|
284
281
|
backdrop-filter: blur(4px);
|
|
285
|
-
scrollbar-width: thin;
|
|
286
|
-
scrollbar-color: var(--ctrls-scrollbar-thumb-bg) transparent;
|
|
287
|
-
overflow: auto;
|
|
288
282
|
max-width: var(--ctrls-width);
|
|
283
|
+
overflow: hidden;
|
|
289
284
|
}
|
|
290
285
|
.ctrls *,
|
|
291
286
|
.ctrls *::before,
|
|
@@ -305,6 +300,38 @@
|
|
|
305
300
|
overflow: visible;
|
|
306
301
|
}
|
|
307
302
|
|
|
303
|
+
.ctrls__title {
|
|
304
|
+
background: none;
|
|
305
|
+
border: none;
|
|
306
|
+
font-weight: bold;
|
|
307
|
+
letter-spacing: -0.025em;
|
|
308
|
+
width: 100%;
|
|
309
|
+
padding: 0.375rem 0.5rem;
|
|
310
|
+
cursor: pointer;
|
|
311
|
+
transition: color 300ms, background-color 300ms;
|
|
312
|
+
}
|
|
313
|
+
.ctrls__title:focus-visible, .ctrls__title:hover {
|
|
314
|
+
color: var(--ctrls-theme);
|
|
315
|
+
background: var(--ctrls-btn-hover-bg);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ctrls__controls {
|
|
319
|
+
display: grid;
|
|
320
|
+
gap: 0.5rem;
|
|
321
|
+
padding: 0.5rem;
|
|
322
|
+
overflow: auto;
|
|
323
|
+
scrollbar-width: thin;
|
|
324
|
+
scrollbar-color: var(--ctrls-scrollbar-thumb-bg) transparent;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.ctrls__title + .ctrls__controls {
|
|
328
|
+
border-top: 1px solid var(--ctrls-border);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.ctrls--hidden .ctrls__controls {
|
|
332
|
+
display: none;
|
|
333
|
+
}
|
|
334
|
+
|
|
308
335
|
/* ----- Buttons ----- */
|
|
309
336
|
.ctrls__btn {
|
|
310
337
|
background: none;
|
|
@@ -315,17 +342,17 @@
|
|
|
315
342
|
justify-content: center;
|
|
316
343
|
gap: 0.25rem;
|
|
317
344
|
border-radius: var(--ctrls-radius);
|
|
318
|
-
transition: color
|
|
345
|
+
transition: color 300ms, background-color 300ms;
|
|
319
346
|
}
|
|
320
347
|
.ctrls__btn:focus-visible, .ctrls__btn:hover {
|
|
321
348
|
color: var(--ctrls-btn-hover-text);
|
|
322
349
|
}
|
|
323
350
|
.ctrls__btn svg {
|
|
324
351
|
width: 1rem;
|
|
325
|
-
transition: transform
|
|
352
|
+
transition: transform 300ms, color 300ms;
|
|
326
353
|
}
|
|
327
354
|
.ctrls__btn path {
|
|
328
|
-
transition: opacity
|
|
355
|
+
transition: opacity 300ms;
|
|
329
356
|
}
|
|
330
357
|
|
|
331
358
|
.ctrls__btn--lg {
|
package/dist/ctrls.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../node_modules/@stanko/dual-range-input/dist/index.css","../src/scss/_ctrls.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;;AC3IF;EACE;AAAA;AAAA;EAGA;EACA;EACA;EACA;EAGA;EACA;EAEA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EAGA;EACA;EACA;EAGA;EACA;EAGA;EAGA;EAEA;EACA;EAEA;EACA;EAGA;EAGA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAGA;EACA;EAEA;EAEA;EACA;EAEA;EAGA;EAEA;EACA;;;AA+CF;EACE;IA3CA;IAEA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IAGA;IAGA;IACA;IACA;IAGA;IACA;IAGA;IAGA;IAEA;IAGA;IAGA;AAAA;AAAA;;;AAWF;EAhDE;EAEA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EAGA;EACA;EACA;EAGA;EACA;EAGA;EAGA;EAEA;EAGA;EAGA;AAAA;AAAA;;;AAiBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../node_modules/@stanko/dual-range-input/dist/index.css","../src/scss/_ctrls.scss"],"names":[],"mappings":"AAAA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;;;;AC3IF;EACE;AAAA;AAAA;EAGA;EACA;EACA;EACA;EAGA;EACA;EAEA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EAGA;EACA;EACA;EAGA;EACA;EAGA;EAGA;EAEA;EACA;EAEA;EACA;EAGA;EAGA;EACA;EAEA;EACA;EAEA;EACA;EACA;EACA;EAGA;EACA;EAEA;EAEA;EACA;EAEA;EAGA;EAEA;EACA;;;AA+CF;EACE;IA3CA;IAEA;IACA;IAGA;IACA;IACA;IACA;IACA;IACA;IAGA;IAGA;IACA;IACA;IAGA;IACA;IAGA;IAGA;IAEA;IAGA;IAGA;AAAA;AAAA;;;AAWF;EAhDE;EAEA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EAGA;EACA;EACA;EAGA;EACA;EAGA;EAGA;EAEA;EAGA;EAGA;AAAA;AAAA;;;AAiBF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;EAGE;EACA;EACA;;AAGF;AAAA;EAEE;EACA;EACA;;AAGF;EACE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YACE;;AAGF;EAEE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;AAGA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YACE;;AAGF;EAEE;;AAGF;EACE;EACA,YACE;;AAIJ;EACE;;;AAKJ;EACE;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;;;AAOA;EACE;;AAGF;AAAA;AAAA;EAEE;;;AAKN;AAEA;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAKA;AAAA;EACE;EACA;EACA;;;AAIJ;AAEA;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAIF;EACE;;;AAIF;EACE;;;AAIF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAmCJ;EA5BE;EACA;EACA;EACA;EACA;EAEA;;;AA0BF;EAhCE;EACA;EACA;EACA;EACA;EAEA;;;AA8BF;EAtBE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAkBA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAKF;EAvDE;EACA;EACA;EACA;EACA;EAEA;;;AAqDF;EA7CE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAwCA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EAGE;;AAEA;EACE;;AANJ;EASE;EACA;EAEA;EACA;EACA;EAEA;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;;AAIJ;AAEA;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YACE;EAEF;EACA;EACA;;AAEA;EAEE;EACA;;;AAIJ;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;AAEA;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;;;AAIJ;EACE;EACA;;AAIE;EACE;;;AAKN;AAEA;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;AAEA;AAAA;EAEE;EACA;EACA;;;AAIJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YACE;;AAGF;EAEE;EACA;;;AAIJ;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EAEE;;AAEA;EACE;EACA","file":"ctrls.css"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getRandomString: (slice?: number) => string;
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stanko/ctrls",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"start": "vite",
|
|
7
|
-
"build": "tsc && vite build",
|
|
6
|
+
"start": "npm run parse-markdown && vite",
|
|
7
|
+
"build": "npm run parse-markdown && tsc && rm -rf ./docs && vite build && touch ./docs/.nojekyll",
|
|
8
8
|
"build-css": "sass ./src/scss/index.scss ./dist/ctrls.css",
|
|
9
9
|
"build-lib": "rm -rf ./dist && tsc -p ./tsconfig-lib.json && npm run build-css",
|
|
10
|
+
"parse-markdown": "node ./parse-markdown.js",
|
|
10
11
|
"preview": "vite preview",
|
|
11
12
|
"prepare": "cp ./pre-commit ./.git/hooks/pre-commit && chmod +x ./.git/hooks/pre-commit"
|
|
12
13
|
},
|
|
Binary file
|
|
Binary file
|