@digitalmeadow/control-panel 1.0.17 → 1.0.18

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
@@ -2,6 +2,11 @@
2
2
 
3
3
  GUI control panel for creative coding.
4
4
 
5
+ ## Installation
6
+ ```bash
7
+ npm install @digitalmeadow/control-panel
8
+ ```
9
+
5
10
  ## Features
6
11
 
7
12
  - Dependency free
@@ -11,6 +16,7 @@ GUI control panel for creative coding.
11
16
  ## Controllers
12
17
 
13
18
  - Number
19
+ - Range
14
20
  - Select
15
21
  - Boolean
16
22
  - Button
@@ -27,7 +33,7 @@ import { ControlPanel } from "@digitalmeadow/control-panel";
27
33
  const state = { number: 50, color: "#3498db", enabled: true };
28
34
  const controlPanel = new ControlPanel();
29
35
 
30
- controlPanel.addNumber(state, "number", { min: 0, max: 100, step: 1 });
36
+ controlPanel.addRange(state, "number", { min: 0, max: 100, step: 1 });
31
37
  controlPanel.addColor(state, "color");
32
38
  controlPanel.addBoolean(state, "enabled");
33
39
  controlPanel.addButton("Reset", () => controlPanel.reset());
@@ -56,6 +62,7 @@ pnpm build
56
62
 
57
63
  ```typescript
58
64
  controlPanel.addNumber(object, property, options?)
65
+ controlPanel.addRange(object, property, options?)
59
66
  controlPanel.addSelect(object, property, options?)
60
67
  controlPanel.addBoolean(object, property, options?)
61
68
  controlPanel.addButton(label, fn, options?)
@@ -0,0 +1,19 @@
1
+ @font-face {
2
+ font-family: "IosevkaTermNF";
3
+ src: url("./IosevkaTermNF-Regular.woff2") format("woff2");
4
+ font-weight: 400;
5
+ font-style: normal;
6
+ font-display: swap;
7
+ }
8
+
9
+ @font-face {
10
+ font-family: "IosevkaTermNF";
11
+ src: url("./IosevkaTermNFP-SemiBold.woff2") format("woff2");
12
+ font-weight: 600;
13
+ font-style: normal;
14
+ font-display: swap;
15
+ }
16
+
17
+ :root {
18
+ --cp-font-family: "IosevkaTermNF";
19
+ }
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const W = `
2
2
  .cp-root {
3
- --cp-scale: 2;
3
+ --cp-scale: 1;
4
4
 
5
5
  --cp-space-1: calc(1px * var(--cp-scale));
6
6
  --cp-space-2: calc(2px * var(--cp-scale));
@@ -1,6 +1,6 @@
1
1
  (function(h,L){typeof exports=="object"&&typeof module<"u"?L(exports):typeof define=="function"&&define.amd?define(["exports"],L):(h=typeof globalThis<"u"?globalThis:h||self,L(h.ControlPanel={}))})(this,(function(h){"use strict";const L=`
2
2
  .cp-root {
3
- --cp-scale: 2;
3
+ --cp-scale: 1;
4
4
 
5
5
  --cp-space-1: calc(1px * var(--cp-scale));
6
6
  --cp-space-2: calc(2px * var(--cp-scale));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitalmeadow/control-panel",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "type": "module",
5
5
  "description": "A minimalist, framework-agnostic control panel GUI",
6
6
  "author": "Digital Meadow <inbox@digitalmeadow.studio> (https://digitalmeadow.studio)",
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "dev": "vite",
32
- "build": "vite build && tsc",
32
+ "build": "vite build && tsc && cp -r src/fonts dist/fonts",
33
33
  "preview": "vite preview"
34
34
  },
35
35
  "devDependencies": {
@@ -37,4 +37,4 @@
37
37
  "typescript": "5.9.3",
38
38
  "vite": "7.3.1"
39
39
  }
40
- }
40
+ }