@novely/solid-renderer 0.0.0-beta.5 → 0.0.2

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/dist/index.css CHANGED
@@ -1,9 +1,9 @@
1
1
  /* esbuild-css-modules-plugin-namespace:./src/styles/root.module.css?esbuild-css-modules-plugin-built */
2
2
  .n-root {
3
- height: 100vh;
4
3
  background-position: center;
5
4
  background-repeat: no-repeat;
6
5
  background-size: cover;
6
+ height: 100vh;
7
7
  font-family:
8
8
  ui-sans-serif,
9
9
  system-ui,
@@ -47,7 +47,6 @@
47
47
  opacity: .9;
48
48
  }
49
49
  .n-buttonInputDialogPanel {
50
- width: -moz-fit-content;
51
50
  width: fit-content;
52
51
  padding: .4em .6em;
53
52
  font-size: 1.2375em;
@@ -87,22 +86,20 @@
87
86
 
88
87
  /* esbuild-css-modules-plugin-namespace:./src/styles/dialog.module.css?esbuild-css-modules-plugin-built */
89
88
  .n-dialog {
90
- min-height: 26vh;
91
- width: 75%;
92
89
  z-index: 22;
93
90
  text-align: left;
94
91
  cursor: default;
95
92
  user-select: none;
96
93
  flex-direction: column;
97
94
  justify-content: flex-end;
95
+ width: 75%;
96
+ min-height: 26vh;
98
97
  position: absolute;
99
98
  bottom: .4em;
100
99
  left: 50%;
101
100
  transform: translateX(-50%);
102
101
  }
103
102
  .n-dialogContainer {
104
- height: 100%;
105
- min-height: 18vh;
106
103
  color: var(--novely-dialog-color, #fff);
107
104
  border: 3px solid var(--novely-dialog-border-color, #fff);
108
105
  border-radius: var(--novely-dialog-border-radius, 14px);
@@ -113,13 +110,15 @@
113
110
  background-size: var(--novely-dialog-background-size, 100px 100px);
114
111
  flex-grow: 1;
115
112
  grid-template-areas: "n-pers n-text" "n-pers n-text";
113
+ height: 100%;
114
+ min-height: 18vh;
116
115
  padding-bottom: 2.8em;
117
116
  display: grid;
118
117
  }
119
118
  .n-dialogPerson {
120
- max-height: 25vh;
121
- max-width: 25vw;
122
119
  grid-area: n-pers;
120
+ max-width: 25vw;
121
+ max-height: 25vh;
123
122
  }
124
123
  .n-dialogContainerWithPerson[data-no-person=true] {
125
124
  grid-template-areas: "n-text n-text" "n-text n-text";
@@ -134,23 +133,22 @@
134
133
  display: block;
135
134
  }
136
135
  .n-dialogName {
137
- width: -moz-fit-content;
138
- width: fit-content;
139
136
  background: #fff;
140
137
  border-radius: 7px 7px 0 0;
138
+ width: fit-content;
141
139
  margin-left: 5vmin;
142
140
  font-size: 1.4375em;
143
141
  line-height: 1.2;
144
142
  box-shadow: 1px 1px 3px #00000042;
145
143
  }
146
144
  .n-dialogContent {
147
- width: 100%;
148
145
  text-shadow:
149
146
  1px 1px #000,
150
147
  -1px -1px #000,
151
148
  1px -1px #000,
152
149
  -1px 1px #000;
153
150
  grid-area: n-text;
151
+ width: 100%;
154
152
  font-size: 2.2375em;
155
153
  line-height: 1.2;
156
154
  }
@@ -158,12 +156,12 @@
158
156
  .n-dialogPerson > img {
159
157
  height: 100%;
160
158
  }
161
- @media (max-width: 768px) {
159
+ @media (width <= 768px) {
162
160
  .n-dialog {
163
- width: 100%;
164
161
  bottom: 0;
165
162
  left: unset;
166
163
  transform: unset;
164
+ width: 100%;
167
165
  }
168
166
  .n-dialogName {
169
167
  font-size: 1.02em;
@@ -184,45 +182,44 @@
184
182
  overflow-y: auto;
185
183
  }
186
184
  .n-headlessDialogContainer {
187
- min-height: 100vh;
188
185
  justify-content: center;
189
186
  align-items: center;
187
+ min-height: 100vh;
190
188
  display: flex;
191
189
  }
192
190
  .n-headlessDialogFix {
193
- height: 100vh;
194
191
  vertical-align: middle;
192
+ height: 100vh;
195
193
  display: inline-block;
196
194
  }
197
195
  .n-headlessDialogPanel {
198
196
  text-align: left;
199
197
  z-index: 21;
198
+ flex-direction: column;
199
+ align-items: stretch;
200
200
  width: 100%;
201
201
  max-width: 40vw;
202
202
  min-height: 40vh;
203
- flex-direction: column;
204
- align-items: stretch;
205
203
  display: flex;
206
204
  }
207
205
  .n-headlessDialogPanelLabel {
208
206
  user-select: none;
209
207
  font-size: 1.2375em;
210
208
  }
211
- @media (max-width: 768px) {
209
+ @media (width <= 768px) {
212
210
  .n-headlessDialogPanel {
213
211
  max-width: 95vw;
214
212
  }
215
213
  }
216
214
  .n-inputDialogLabel {
217
- width: 100%;
218
215
  flex-direction: column;
219
216
  justify-content: center;
220
217
  align-items: center;
218
+ width: 100%;
221
219
  font-size: 1.2375em;
222
220
  display: flex;
223
221
  }
224
222
  .n-inputDialogLabel > span {
225
- min-height: 1em;
226
223
  min-height: 1lh;
227
224
  margin: .4em 0;
228
225
  }
@@ -248,15 +245,15 @@
248
245
  overflow: hidden;
249
246
  }
250
247
  .n-mainMenu > .n-controls {
251
- width: 30vw;
252
- height: 100%;
253
248
  flex-direction: column;
254
249
  justify-content: center;
255
250
  align-items: center;
251
+ width: 30vw;
252
+ height: 100%;
256
253
  padding: 0 1em;
257
254
  display: flex;
258
255
  }
259
- @media (max-width: 768px) {
256
+ @media (width <= 768px) {
260
257
  .n-mainMenu > .n-controls {
261
258
  width: 100%;
262
259
  }
@@ -272,18 +269,18 @@
272
269
  overflow: hidden;
273
270
  }
274
271
  .n-saves > .n-controls {
275
- width: 30vw;
276
- height: 100%;
277
272
  flex-direction: column;
278
273
  align-items: center;
274
+ width: 30vw;
275
+ height: 100%;
279
276
  padding: 0 1em;
280
277
  display: flex;
281
278
  }
282
279
  .n-saves > .n-list {
283
- width: 100%;
284
- height: 100%;
285
280
  flex-direction: column;
286
281
  align-items: center;
282
+ width: 100%;
283
+ height: 100%;
287
284
  padding: 0 1em;
288
285
  list-style: none;
289
286
  display: flex;
@@ -292,7 +289,7 @@
292
289
  .n-saves > .n-list > li {
293
290
  display: flex;
294
291
  }
295
- @media (max-width: 768px) {
292
+ @media (width <= 768px) {
296
293
  .n-saves {
297
294
  flex-direction: column;
298
295
  }
@@ -325,21 +322,21 @@
325
322
  overflow: hidden;
326
323
  }
327
324
  .n-settings .n-controls {
328
- width: 30vw;
329
- height: 100%;
330
325
  flex-direction: column;
331
326
  justify-content: center;
332
327
  align-items: center;
328
+ width: 30vw;
329
+ height: 100%;
333
330
  padding-left: 1em;
334
331
  display: flex;
335
332
  }
336
333
  .n-content {
337
- width: 100%;
338
- height: 100%;
339
334
  flex-direction: column;
340
335
  flex: 1 1 0;
341
336
  justify-content: center;
342
337
  align-items: start;
338
+ width: 100%;
339
+ height: 100%;
343
340
  padding-left: 1em;
344
341
  list-style: none;
345
342
  display: flex;
@@ -380,15 +377,15 @@
380
377
  position: relative;
381
378
  }
382
379
  .n-lds-ellipsis div {
383
- width: 13px;
384
- height: 13px;
385
380
  background: #fff;
386
381
  border-radius: 50%;
382
+ width: 13px;
383
+ height: 13px;
387
384
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
388
385
  position: absolute;
389
386
  top: 33px;
390
387
  }
391
- .n-lds-ellipsis div:nth-child(1) {
388
+ .n-lds-ellipsis div:first-child {
392
389
  animation: .6s infinite n-lds-ellipsis1;
393
390
  left: 8px;
394
391
  }
package/dist/index.jsx CHANGED
@@ -311,10 +311,7 @@ var Game = (props) => {
311
311
  <button
312
312
  type="button"
313
313
  class={join(root_module_default.button, root_module_default.buttonControlPanel)}
314
- onClick={() => {
315
- data.options.stack.clear();
316
- props.setState("screen", "mainmenu");
317
- }}
314
+ onClick={data.options.exit}
318
315
  >{data.t("Exit")}</button>
319
316
  </div>
320
317
  </div>;
@@ -516,17 +513,25 @@ var createSolidRenderer = () => {
516
513
  };
517
514
  return render(head, left, right);
518
515
  },
519
- append(className, style) {
516
+ append(className, style, restoring) {
520
517
  clearTimeout(state.characters[character]?.timeoutId);
521
518
  if (className === state.characters[character]?.className) {
522
519
  setState("characters", character, { className: "" });
523
520
  }
524
- setTimeout(() => {
521
+ const show = () => {
525
522
  setState("characters", character, { className, style, visible: true });
526
- }, 4);
523
+ };
524
+ if (restoring)
525
+ return show();
526
+ setTimeout(show, 4);
527
527
  },
528
528
  remove(className, style, duration) {
529
- return (resolve) => {
529
+ return (resolve, restoring) => {
530
+ if (restoring) {
531
+ setState("characters", character, { visible: false });
532
+ resolve();
533
+ return;
534
+ }
530
535
  const timeoutId = setTimeout(() => {
531
536
  setState("characters", character, { visible: false });
532
537
  resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@novely/solid-renderer",
3
- "version": "0.0.0-beta.5",
3
+ "version": "0.0.2",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,13 +14,13 @@
14
14
  "build": "node ./build.js && tsc"
15
15
  },
16
16
  "devDependencies": {
17
- "esbuild": "^0.16.3",
17
+ "esbuild": "^0.16.17",
18
18
  "esbuild-css-modules-plugin": "^2.7.1",
19
19
  "typescript": "^4.9.5"
20
20
  },
21
21
  "dependencies": {
22
- "@novely/core": "*",
23
- "@novely/typewriter": "*",
22
+ "@novely/core": "workspace:*",
23
+ "@novely/typewriter": "^0.1.0",
24
24
  "solid-headless": "^0.13.1",
25
25
  "solid-js": "1.7.3"
26
26
  },