@n3rdw1z4rd/core 0.16.1 → 0.16.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.
@@ -0,0 +1,2 @@
1
+ import './main.css';
2
+
@@ -0,0 +1,45 @@
1
+ @import './reset.css';
2
+ /* @import url('./reset.css'); */
3
+
4
+ :root {
5
+ /* Colors */
6
+ --color-foreground: lightgray;
7
+ --color-background: #111;
8
+ --color-border: #444;
9
+
10
+ /* Common Variables */
11
+ --border-width: 1px;
12
+ --border-radius: 4px;
13
+ --padding-small: 4px;
14
+ --padding-medium: 8px;
15
+ --padding-large: 16px;
16
+ --margin-small: 4px;
17
+ --margin-medium: 8px;
18
+ --margin-large: 16px;
19
+ --border-style: var(--border-width) dashed var(--color-border);
20
+
21
+ /* Transparency Levels */
22
+ --background-opacity-light: rgba(0, 0, 0, 0.1);
23
+ --background-opacity-medium: rgba(0, 0, 0, 0.5);
24
+ --background-opacity-dark: rgba(0, 0, 0, 0.8);
25
+ }
26
+
27
+ * {
28
+ font: 14px monospace;
29
+ }
30
+
31
+ html {
32
+ color: var(--color-foreground);
33
+ background-color: var(--color-background);
34
+ width: 100%;
35
+ height: 100%;
36
+ overflow: hidden;
37
+ }
38
+
39
+ body,
40
+ #root {
41
+ width: 100%;
42
+ height: 100%;
43
+ margin: 0;
44
+ padding: 0;
45
+ }
@@ -0,0 +1,90 @@
1
+ /* Box sizing rules */
2
+ *,
3
+ *::before,
4
+ *::after {
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ /* Prevent font size inflation */
9
+ html {
10
+ -moz-text-size-adjust: none;
11
+ -webkit-text-size-adjust: none;
12
+ text-size-adjust: none;
13
+ }
14
+
15
+ /* Remove default margin in favour of better control in authored CSS */
16
+ body,
17
+ h1,
18
+ h2,
19
+ h3,
20
+ h4,
21
+ p,
22
+ figure,
23
+ blockquote,
24
+ dl,
25
+ dd {
26
+ margin-block-end: 0;
27
+ }
28
+
29
+ /* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
30
+ ul[role='list'],
31
+ ol[role='list'] {
32
+ list-style: none;
33
+ }
34
+
35
+ /* Set core body defaults */
36
+ body {
37
+ min-height: 100vh;
38
+ line-height: 1.5;
39
+ }
40
+
41
+ /* Set shorter line heights on headings and interactive elements */
42
+ h1,
43
+ h2,
44
+ h3,
45
+ h4,
46
+ button,
47
+ input,
48
+ label {
49
+ line-height: 1.1;
50
+ }
51
+
52
+ /* Balance text wrapping on headings */
53
+ h1,
54
+ h2,
55
+ h3,
56
+ h4 {
57
+ text-wrap: balance;
58
+ }
59
+
60
+ /* A elements that don't have a class get default styles */
61
+ a:not([class]) {
62
+ text-decoration-skip-ink: auto;
63
+ color: currentColor;
64
+ }
65
+
66
+ /* Make images easier to work with */
67
+ img,
68
+ picture {
69
+ max-width: 100%;
70
+ display: block;
71
+ }
72
+
73
+ /* Inherit fonts for inputs and buttons */
74
+ input,
75
+ button,
76
+ textarea,
77
+ select {
78
+ font-family: inherit;
79
+ font-size: inherit;
80
+ }
81
+
82
+ /* Make sure textareas without a rows attribute are not tiny */
83
+ textarea:not([rows]) {
84
+ min-height: 10em;
85
+ }
86
+
87
+ /* Anything that has been anchored to should have extra scroll margin */
88
+ :target {
89
+ scroll-margin-block: 5ex;
90
+ }
package/dist/index.js CHANGED
@@ -976,7 +976,7 @@ var Input = class extends Emitter {
976
976
  this.emit("button_clicked", code, ev);
977
977
  }
978
978
  });
979
- window.addEventListener("mousemove", (ev) => {
979
+ window.addEventListener("pointermove", (ev) => {
980
980
  const { offsetX, offsetY, movementX, movementY } = ev;
981
981
  this._pointerPosition.x = offsetX;
982
982
  this._pointerPosition.y = offsetY;
package/dist/index.mjs CHANGED
@@ -848,7 +848,7 @@ var Input = class extends Emitter {
848
848
  this.emit("button_clicked", code, ev);
849
849
  }
850
850
  });
851
- window.addEventListener("mousemove", (ev) => {
851
+ window.addEventListener("pointermove", (ev) => {
852
852
  const { offsetX, offsetY, movementX, movementY } = ev;
853
853
  this._pointerPosition.x = offsetX;
854
854
  this._pointerPosition.y = offsetY;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@n3rdw1z4rd/core",
3
- "version": "0.16.1",
3
+ "version": "0.16.3",
4
4
  "description": "core library",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -9,8 +9,7 @@
9
9
  "dist"
10
10
  ],
11
11
  "scripts": {
12
- "build-old": "tsup && shx cp -r ./src/css ./dist/",
13
- "build": "tsup",
12
+ "build": "tsup && shx cp -r ./src/css ./dist/",
14
13
  "dev": "tsup --watch",
15
14
  "test": "npx ts-node src/test"
16
15
  },
@@ -44,17 +43,17 @@
44
43
  },
45
44
  "homepage": "https://github.com/n3rdw1z4rd/core#readme",
46
45
  "dependencies": {
47
- "heap-js": "latest"
46
+ "heap-js": "^2.7.1"
48
47
  },
49
48
  "peerDependencies": {
50
- "simplex-noise": "latest",
51
- "three": "latest"
49
+ "simplex-noise": "^4.0.3",
50
+ "three": "^0.185.1"
52
51
  },
53
52
  "devDependencies": {
54
- "@types/three": "latest",
55
- "shx": "latest",
56
- "tsup": "latest",
57
- "typescript": "latest"
53
+ "@types/three": "^0.185.1",
54
+ "shx": "^0.4.0",
55
+ "tsup": "^8.5.1",
56
+ "typescript": "^5.9.3"
58
57
  },
59
58
  "allowScripts": {
60
59
  "esbuild@0.27.7": true,