@novely/solid-renderer 0.25.0 → 0.25.1

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.
@@ -1,2 +1,2 @@
1
- declare const useContextState: (id: string) => import("@novely/renderer-toolkit").DeepMapStore<import("@novely/renderer-toolkit").ContextState>, removeContextState: (id: string) => void;
1
+ declare const useContextState: (id: string) => import("@novely/renderer-toolkit").DeepAtom<import("@novely/renderer-toolkit").ContextState>, removeContextState: (id: string) => void;
2
2
  export { useContextState, removeContextState };
package/dist/index.jsx CHANGED
@@ -3693,13 +3693,13 @@ function cleanChildren(parent, current, marker, replacement) {
3693
3693
  }
3694
3694
  var RequestContext = Symbol();
3695
3695
 
3696
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/task/index.js
3696
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/task/index.js
3697
3697
  var tasks = 0;
3698
3698
  function cleanTasks() {
3699
3699
  tasks = 0;
3700
3700
  }
3701
3701
 
3702
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/clean-stores/index.js
3702
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/clean-stores/index.js
3703
3703
  var clean = Symbol("clean");
3704
3704
  var cleanStores = (...stores) => {
3705
3705
  if (false) {
@@ -3718,7 +3718,7 @@ var cleanStores = (...stores) => {
3718
3718
  }
3719
3719
  };
3720
3720
 
3721
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/atom/index.js
3721
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/atom/index.js
3722
3722
  var listenerQueue = [];
3723
3723
  var atom = (initialValue, level) => {
3724
3724
  let listeners = [];
@@ -3807,7 +3807,7 @@ var atom = (initialValue, level) => {
3807
3807
  return $atom;
3808
3808
  };
3809
3809
 
3810
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/lifecycle/index.js
3810
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/lifecycle/index.js
3811
3811
  var MOUNT = 5;
3812
3812
  var UNMOUNT = 6;
3813
3813
  var REVERT_MUTATION = 10;
@@ -3880,7 +3880,7 @@ var onMount = ($store, initialize) => {
3880
3880
  });
3881
3881
  };
3882
3882
 
3883
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/deep-map/path.js
3883
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/deep-map/path.js
3884
3884
  function getPath(obj, path) {
3885
3885
  let allKeys = getAllKeysFromPath(path);
3886
3886
  let res = obj;
@@ -3926,28 +3926,32 @@ function getKeyAndIndicesFromKey(key) {
3926
3926
  }
3927
3927
  return [key];
3928
3928
  }
3929
+ var IS_NUMBER = /^\d+$/;
3929
3930
  function ensureKey(obj, key, nextKey) {
3930
3931
  if (key in obj) {
3931
3932
  return;
3932
3933
  }
3933
- let nextKeyAsInt = parseInt(
3934
- nextKey !== null && nextKey !== void 0 ? nextKey : ""
3935
- );
3936
- if (Number.isNaN(nextKeyAsInt)) {
3937
- obj[key] = {};
3934
+ let isNum = IS_NUMBER.test(nextKey);
3935
+ if (isNum) {
3936
+ obj[key] = Array(parseInt(nextKey, 10) + 1).fill(void 0);
3938
3937
  } else {
3939
- obj[key] = Array(nextKeyAsInt + 1).fill(void 0);
3938
+ obj[key] = {};
3940
3939
  }
3941
3940
  }
3942
3941
 
3943
- // ../../node_modules/.pnpm/nanostores@0.10.0/node_modules/nanostores/deep-map/index.js
3942
+ // ../../node_modules/.pnpm/nanostores@0.10.3/node_modules/nanostores/deep-map/index.js
3944
3943
  function deepMap(initial = {}) {
3945
3944
  let $deepMap = atom(initial);
3946
3945
  $deepMap.setKey = (key, value) => {
3947
- let oldMap = $deepMap.value;
3946
+ let oldValue;
3947
+ try {
3948
+ oldValue = structuredClone($deepMap.value);
3949
+ } catch {
3950
+ oldValue = { ...$deepMap.value };
3951
+ }
3948
3952
  if (getPath($deepMap.value, key) !== value) {
3949
3953
  $deepMap.value = { ...setPath($deepMap.value, key, value) };
3950
- $deepMap.notify(oldMap, key);
3954
+ $deepMap.notify(oldValue, key);
3951
3955
  }
3952
3956
  };
3953
3957
  return $deepMap;
@@ -3970,10 +3974,72 @@ var memo = (input, cb) => {
3970
3974
  });
3971
3975
  return $memoized;
3972
3976
  };
3977
+ var getClonedOldValue = (atom2) => {
3978
+ let oldValue;
3979
+ try {
3980
+ oldValue = structuredClone(atom2.value);
3981
+ } catch {
3982
+ oldValue = { ...atom2.value };
3983
+ }
3984
+ return oldValue;
3985
+ };
3986
+ var usePath = (atomValue, getPath2) => {
3987
+ const targets = /* @__PURE__ */ new Set();
3988
+ const path = [];
3989
+ let current;
3990
+ const proxyHandler = {
3991
+ get(target, prop, receiver) {
3992
+ if (targets.has(target)) {
3993
+ throw new ReferenceError(`Attempted to access property on the same target multiple times.`);
3994
+ }
3995
+ const value = Reflect.get(target, prop, receiver);
3996
+ targets.add(target);
3997
+ path.push(prop);
3998
+ current = value;
3999
+ if (value && typeof value === "object") {
4000
+ return new Proxy(value, proxyHandler);
4001
+ }
4002
+ return value;
4003
+ }
4004
+ };
4005
+ getPath2(new Proxy(atomValue, proxyHandler));
4006
+ if (path.length === 0) {
4007
+ throw new Error("No valid path extracted from the provided getPath function.");
4008
+ }
4009
+ return {
4010
+ path,
4011
+ value: current
4012
+ };
4013
+ };
4014
+ var deepAtom = (init) => {
4015
+ const $atom = deepMap(init);
4016
+ $atom.mutate = (getPath2, setter) => {
4017
+ const { path, value } = usePath($atom.get(), getPath2);
4018
+ const newValue = typeof setter === "function" ? setter(value) : setter;
4019
+ if (newValue === value) {
4020
+ console.warn(`The new value is the same as the current value.`);
4021
+ return newValue;
4022
+ }
4023
+ const oldMap = getClonedOldValue($atom);
4024
+ const fakedPath = {
4025
+ split: () => {
4026
+ return {
4027
+ flatMap: () => {
4028
+ return path;
4029
+ }
4030
+ };
4031
+ }
4032
+ };
4033
+ $atom.value = { ...setPath($atom.value, fakedPath, newValue) };
4034
+ $atom.notify(oldMap, path.join("."));
4035
+ return newValue;
4036
+ };
4037
+ return $atom;
4038
+ };
3973
4039
  var getDefaultContextState = () => {
3974
4040
  return {
3975
4041
  background: {
3976
- background: ""
4042
+ background: "#000"
3977
4043
  },
3978
4044
  characters: {},
3979
4045
  choice: {
@@ -4007,7 +4073,7 @@ var getDefaultContextState = () => {
4007
4073
  var createContextStateRoot = (getExtension = () => ({})) => {
4008
4074
  const CACHE = /* @__PURE__ */ new Map();
4009
4075
  const make = () => {
4010
- const contextState = deepMap({
4076
+ const contextState = deepAtom({
4011
4077
  ...getDefaultContextState(),
4012
4078
  ...getExtension()
4013
4079
  });
@@ -4041,7 +4107,7 @@ var createContextStateRoot = (getExtension = () => ({})) => {
4041
4107
  };
4042
4108
  var defaultEmpty = {};
4043
4109
  var createRendererState = (extension = defaultEmpty) => {
4044
- const rendererState = deepMap({
4110
+ const rendererState = deepAtom({
4045
4111
  screen: "mainmenu",
4046
4112
  loadingShown: false,
4047
4113
  exitPromptShown: false,
@@ -4051,11 +4117,6 @@ var createRendererState = (extension = defaultEmpty) => {
4051
4117
  };
4052
4118
  var noop = () => {
4053
4119
  };
4054
- var storeUpdate = (store, path, setter) => {
4055
- const value = getPath(store.get(), path);
4056
- const newer = setter(value);
4057
- store.setKey(path, newer);
4058
- };
4059
4120
  var findLastIndex = (array, fn) => {
4060
4121
  for (let i = array.length - 1; i >= 0; i--) {
4061
4122
  if (fn.call(array, array[i], i, array)) {
@@ -4363,62 +4424,85 @@ var handleBackgroundAction = ($contextState, background) => {
4363
4424
  const { clear } = $contextState.get().background;
4364
4425
  clear && clear();
4365
4426
  if (typeof background === "string") {
4366
- $contextState.setKey("background.background", background);
4427
+ $contextState.mutate((s) => s.background.background, background);
4367
4428
  return;
4368
4429
  }
4369
4430
  const { dispose: dispose2 } = useBackground(background, (value) => {
4370
- $contextState.setKey("background.background", value);
4431
+ $contextState.mutate((s) => s.background.background, value);
4371
4432
  });
4372
- $contextState.setKey("background.clear", dispose2);
4433
+ $contextState.mutate((s) => s.background.clear, () => dispose2);
4373
4434
  };
4374
4435
  var handleDialogAction = ($contextState, content, name, character, emotion, resolve) => {
4375
- $contextState.setKey("dialog", {
4376
- content,
4377
- name,
4378
- miniature: {
4379
- character,
4380
- emotion
4381
- },
4382
- visible: true,
4383
- resolve
4384
- });
4436
+ $contextState.mutate(
4437
+ (s) => s.dialog,
4438
+ {
4439
+ content,
4440
+ name,
4441
+ miniature: {
4442
+ character,
4443
+ emotion
4444
+ },
4445
+ visible: true,
4446
+ resolve
4447
+ }
4448
+ );
4385
4449
  };
4386
4450
  var handleChoiceAction = ($contextState, label, choices, resolve) => {
4387
- $contextState.setKey("choice", { choices, label, resolve, visible: true });
4451
+ $contextState.mutate(
4452
+ (s) => s.choice,
4453
+ { choices, label, resolve, visible: true }
4454
+ );
4388
4455
  };
4389
4456
  var handleClearAction = ($rendererState, $contextState, context, keep, keepCharacters) => {
4390
- $rendererState.setKey("exitPromptShown", false);
4457
+ $rendererState.mutate((s) => s.exitPromptShown, false);
4391
4458
  if (!keep.has("showBackground")) {
4392
- $contextState.setKey("background.background", "#000");
4459
+ $contextState.mutate((s) => s.background.background, "#000");
4393
4460
  }
4394
4461
  if (!keep.has("choice")) {
4395
- $contextState.setKey("choice", {
4396
- choices: [],
4397
- visible: false,
4398
- label: ""
4399
- });
4462
+ $contextState.mutate(
4463
+ (s) => s.choice,
4464
+ {
4465
+ choices: [],
4466
+ visible: false,
4467
+ label: ""
4468
+ }
4469
+ );
4400
4470
  }
4401
4471
  if (!keep.has("input")) {
4402
- $contextState.setKey("input", {
4403
- element: null,
4404
- label: "",
4405
- visible: false,
4406
- error: ""
4407
- });
4472
+ $contextState.mutate(
4473
+ (s) => s.input,
4474
+ {
4475
+ element: null,
4476
+ label: "",
4477
+ visible: false,
4478
+ error: ""
4479
+ }
4480
+ );
4408
4481
  }
4409
4482
  if (!keep.has("dialog")) {
4410
- $contextState.setKey("dialog", { visible: false, content: "", name: "", miniature: {} });
4483
+ $contextState.mutate(
4484
+ (s) => s.dialog,
4485
+ {
4486
+ visible: false,
4487
+ content: "",
4488
+ name: "",
4489
+ miniature: {}
4490
+ }
4491
+ );
4411
4492
  }
4412
4493
  if (!keep.has("text")) {
4413
- $contextState.setKey("text", { content: "" });
4494
+ $contextState.mutate((s) => s.text, { content: "" });
4414
4495
  }
4415
4496
  const { characters, custom } = $contextState.get();
4416
4497
  for (const character of Object.keys(characters)) {
4417
4498
  if (!keepCharacters.has(character)) {
4418
- $contextState.setKey(`characters.${character}`, {
4419
- style: void 0,
4420
- visible: false
4421
- });
4499
+ $contextState.mutate(
4500
+ (s) => s.characters[character],
4501
+ {
4502
+ style: void 0,
4503
+ visible: false
4504
+ }
4505
+ );
4422
4506
  }
4423
4507
  }
4424
4508
  for (const [id, handler] of Object.entries(custom)) {
@@ -4427,7 +4511,7 @@ var handleClearAction = ($rendererState, $contextState, context, keep, keepChara
4427
4511
  if (context.meta.goingBack && handler.fn.skipClearOnGoingBack)
4428
4512
  continue;
4429
4513
  handler.clear();
4430
- $contextState.setKey(`custom.${id}`, void 0);
4514
+ $contextState.mutate((s) => s.custom[id], void 0);
4431
4515
  }
4432
4516
  };
4433
4517
  var handleCustomAction = ($contextState, options, context, fn, resolve) => {
@@ -4441,7 +4525,7 @@ var handleCustomAction = ($contextState, options, context, fn, resolve) => {
4441
4525
  let store = {};
4442
4526
  const clearManager = () => {
4443
4527
  clear();
4444
- $contextState.setKey(`custom.${fn.key}`, void 0);
4528
+ $contextState.mutate((s) => s.custom[fn.key], void 0);
4445
4529
  };
4446
4530
  const createElement = () => {
4447
4531
  const div = document.createElement("div");
@@ -4460,12 +4544,15 @@ var handleCustomAction = ($contextState, options, context, fn, resolve) => {
4460
4544
  clear = cb;
4461
4545
  }
4462
4546
  };
4463
- $contextState.setKey(`custom.${fn.key}`, {
4464
- dom: element,
4465
- fn,
4466
- getReturn,
4467
- clear: clearManager
4468
- });
4547
+ $contextState.mutate(
4548
+ (s) => s.custom[fn.key],
4549
+ {
4550
+ dom: element,
4551
+ fn,
4552
+ getReturn,
4553
+ clear: clearManager
4554
+ }
4555
+ );
4469
4556
  return getReturn;
4470
4557
  };
4471
4558
  const result = fn({
@@ -4484,11 +4571,11 @@ var handleClearCustomAction = ($contextState, fn) => {
4484
4571
  data.clear();
4485
4572
  };
4486
4573
  var handleTextAction = ($contextState, content, resolve) => {
4487
- $contextState.setKey("text", { content, resolve });
4574
+ $contextState.mutate((s) => s.text, { content, resolve });
4488
4575
  };
4489
4576
  var handleInputAction = ($contextState, options, context, label, onInput, setup, resolve) => {
4490
4577
  const error = (value) => {
4491
- $contextState.setKey("input.error", value);
4578
+ $contextState.mutate((s) => s.input.error, value);
4492
4579
  };
4493
4580
  const onInputHandler = (event) => {
4494
4581
  let value;
@@ -4511,14 +4598,17 @@ var handleInputAction = ($contextState, options, context, label, onInput, setup,
4511
4598
  input.setAttribute("required", "true");
4512
4599
  input.setAttribute("autocomplete", "off");
4513
4600
  !context.meta.preview && input.addEventListener("input", onInputHandler);
4514
- setup(input, (callback) => $contextState.setKey("input.cleanup", callback));
4515
- $contextState.setKey("input", {
4516
- element: input,
4517
- label,
4518
- error: "",
4519
- visible: true,
4520
- resolve
4521
- });
4601
+ setup(input, (callback) => $contextState.mutate((s) => s.input.cleanup, () => callback));
4602
+ $contextState.mutate(
4603
+ (s) => s.input,
4604
+ {
4605
+ element: input,
4606
+ label,
4607
+ error: "",
4608
+ visible: true,
4609
+ resolve
4610
+ }
4611
+ );
4522
4612
  !context.meta.preview && input.dispatchEvent(new InputEvent("input", { bubbles: true }));
4523
4613
  };
4524
4614
  var handleVibrateAction = vibrate;
@@ -5088,7 +5178,7 @@ var Save = (props) => {
5088
5178
  };
5089
5179
  delegateEvents(["click"]);
5090
5180
 
5091
- // ../typewriter/dist/index.js
5181
+ // ../../node_modules/.pnpm/@novely+typewriter@0.5.1/node_modules/@novely/typewriter/dist/index.js
5092
5182
  var defaultSpeed = () => {
5093
5183
  return Math.min(90 * Math.random() + 100, 90);
5094
5184
  };
@@ -5801,12 +5891,6 @@ var Settings = () => {
5801
5891
  const language = () => data.storageData().meta[0];
5802
5892
  const textSpeed = () => data.storageData().meta[1];
5803
5893
  const volume = (kind) => data.storageData().meta[kind];
5804
- const getLanguageName = (lang) => {
5805
- const intl = new Intl.DisplayNames([language()], {
5806
- type: "language"
5807
- });
5808
- return intl.of(lang) || lang;
5809
- };
5810
5894
  const onLanguageSelect = ({
5811
5895
  currentTarget: {
5812
5896
  value
@@ -5863,7 +5947,7 @@ var Settings = () => {
5863
5947
  children: (lang) => (() => {
5864
5948
  const _el$33 = _tmpl$29();
5865
5949
  _el$33.value = lang;
5866
- insert(_el$33, () => capitalize(getLanguageName(lang)));
5950
+ insert(_el$33, () => data.options.getLanguageDisplayName(lang));
5867
5951
  createRenderEffect(() => _el$33.selected = lang === language());
5868
5952
  return _el$33;
5869
5953
  })()
@@ -6095,7 +6179,7 @@ var createSolidRenderer = ({
6095
6179
  },
6096
6180
  append(className2, style2) {
6097
6181
  clearTimeout($contextState.get().characters[character]?.hideTimeoutId);
6098
- $contextState.setKey(`characters.${character}`, {
6182
+ $contextState.mutate((s) => s.characters[character], {
6099
6183
  style: style2,
6100
6184
  visible: true
6101
6185
  });
@@ -6111,19 +6195,19 @@ var createSolidRenderer = ({
6111
6195
  remove(className2, style2, duration, restoring) {
6112
6196
  return new Promise((resolve) => {
6113
6197
  if (restoring) {
6114
- $contextState.setKey(`characters.${character}.visible`, false);
6198
+ $contextState.mutate((s) => s.characters[character].visible, false);
6115
6199
  resolve();
6116
6200
  return;
6117
6201
  }
6118
6202
  const timeoutId = setTimeout(() => {
6119
- $contextState.setKey(`characters.${character}.visible`, false);
6203
+ $contextState.mutate((s) => s.characters[character].visible, false);
6120
6204
  resolve();
6121
6205
  }, duration);
6122
6206
  if (className2) {
6123
6207
  chars[character].canvas.className = className2;
6124
6208
  }
6125
- $contextState.setKey(`characters.${character}.style`, style2);
6126
- $contextState.setKey(`characters.${character}.hideTimeoutId`, timeoutId);
6209
+ $contextState.mutate((s) => s.characters[character].style, style2);
6210
+ $contextState.mutate((s) => s.characters[character].hideTimeoutId, timeoutId);
6127
6211
  });
6128
6212
  },
6129
6213
  animate(timeout, classes) {
@@ -6187,19 +6271,19 @@ var createSolidRenderer = ({
6187
6271
  return $contextState.get().meta.restoring;
6188
6272
  },
6189
6273
  set restoring(value) {
6190
- $contextState.setKey("meta.restoring", value);
6274
+ $contextState.mutate((s) => s.meta.restoring, value);
6191
6275
  },
6192
6276
  get preview() {
6193
6277
  return $contextState.get().meta.preview;
6194
6278
  },
6195
6279
  set preview(value) {
6196
- $contextState.setKey("meta.preview", value);
6280
+ $contextState.mutate((s) => s.meta.preview, value);
6197
6281
  },
6198
6282
  get goingBack() {
6199
6283
  return $contextState.get().meta.goingBack;
6200
6284
  },
6201
6285
  set goingBack(value) {
6202
- $contextState.setKey("meta.goingBack", value);
6286
+ $contextState.mutate((s) => s.meta.goingBack, value);
6203
6287
  }
6204
6288
  }
6205
6289
  };
@@ -6211,19 +6295,19 @@ var createSolidRenderer = ({
6211
6295
  },
6212
6296
  ui: {
6213
6297
  showScreen(name) {
6214
- $rendererState.setKey("screen", name);
6298
+ $rendererState.mutate((s) => s.screen, name);
6215
6299
  },
6216
6300
  getScreen() {
6217
6301
  return $rendererState.get().screen;
6218
6302
  },
6219
6303
  showLoading() {
6220
- $rendererState.setKey("loadingShown", true);
6304
+ $rendererState.mutate((s) => s.loadingShown, true);
6221
6305
  },
6222
6306
  hideLoading() {
6223
- $rendererState.setKey("loadingShown", false);
6307
+ $rendererState.mutate((s) => s.loadingShown, false);
6224
6308
  },
6225
6309
  showExitPrompt() {
6226
- $rendererState.setKey("exitPromptShown", true);
6310
+ $rendererState.mutate((s) => s.exitPromptShown, true);
6227
6311
  },
6228
6312
  start: createStartFunction(() => {
6229
6313
  const Root = createRootComponent({
@@ -6267,10 +6351,10 @@ var createSolidRenderer = ({
6267
6351
  return renderer;
6268
6352
  },
6269
6353
  registerScreen(name, screen) {
6270
- $rendererState.setKey(`screens.${name}`, screen);
6354
+ $rendererState.mutate((s) => s.screens[name], () => screen);
6271
6355
  },
6272
6356
  registerMainmenuItem(fn) {
6273
- storeUpdate($rendererState, "mainmenu", (mainmenu) => [...mainmenu, fn]);
6357
+ $rendererState.mutate((s) => s.mainmenu, (mainmenu) => [...mainmenu, fn]);
6274
6358
  }
6275
6359
  };
6276
6360
  };
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
1
  {
2
- "name": "@novely/solid-renderer",
3
- "version": "0.25.0",
4
- "type": "module",
5
- "publishConfig": {
6
- "access": "public"
7
- },
8
- "types": "./dist/index.d.ts",
9
- "main": "./dist/index.jsx",
10
- "module": "./dist/index.jsx",
11
- "sideEffects": false,
12
- "scripts": {
13
- "dev": "node ./build.js --watch",
14
- "build": "node ./build.js && tsc"
15
- },
16
- "devDependencies": {
17
- "esbuild": "^0.19.2",
18
- "esbuild-plugin-solid": "^0.5.0",
19
- "typescript": "^5.2.2"
20
- },
21
- "dependencies": {
22
- "@novely/core": "*",
23
- "@novely/renderer-toolkit": "*",
24
- "@novely/typewriter": "*",
25
- "retrieved": "^0.1.0",
26
- "solid-js": "1.8.5"
27
- },
28
- "peerDependencies": {
29
- "@novely/core": "*",
30
- "solid-js": "*"
31
- },
32
- "license": "ISC",
33
- "bugs": {
34
- "url": "https://github.com/yhdgms1/novely/issues"
35
- },
36
- "homepage": "https://github.com/yhdgms1/novely/tree/main/packages/solid-renderer",
37
- "keywords": [
38
- "novely",
39
- "solid-js",
40
- "solid",
41
- "renderer",
42
- "novel"
43
- ],
44
- "author": {
45
- "name": "Artemiy Schukin",
46
- "url": "https://github.com/yhdgms1"
47
- },
48
- "contributors": [],
49
- "repository": {
50
- "type": "git",
51
- "url": "git+https://github.com/yhdgms1/novely.git"
52
- },
53
- "files": [
54
- "dist/*"
55
- ]
56
- }
2
+ "name": "@novely/solid-renderer",
3
+ "version": "0.25.1",
4
+ "type": "module",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "types": "./dist/index.d.ts",
9
+ "main": "./dist/index.jsx",
10
+ "module": "./dist/index.jsx",
11
+ "sideEffects": false,
12
+ "devDependencies": {
13
+ "esbuild": "^0.19.2",
14
+ "esbuild-plugin-solid": "^0.5.0",
15
+ "typescript": "^5.2.2"
16
+ },
17
+ "dependencies": {
18
+ "@novely/core": "*",
19
+ "@novely/typewriter": "*",
20
+ "retrieved": "^0.1.0",
21
+ "solid-js": "1.8.5",
22
+ "@novely/renderer-toolkit": "0.1.0"
23
+ },
24
+ "peerDependencies": {
25
+ "@novely/core": "*",
26
+ "solid-js": "*"
27
+ },
28
+ "license": "ISC",
29
+ "bugs": {
30
+ "url": "https://github.com/yhdgms1/novely/issues"
31
+ },
32
+ "homepage": "https://github.com/yhdgms1/novely/tree/main/packages/solid-renderer",
33
+ "keywords": [
34
+ "novely",
35
+ "solid-js",
36
+ "solid",
37
+ "renderer",
38
+ "novel"
39
+ ],
40
+ "author": {
41
+ "name": "Artemiy Schukin",
42
+ "url": "https://github.com/yhdgms1"
43
+ },
44
+ "contributors": [],
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/yhdgms1/novely.git"
48
+ },
49
+ "files": [
50
+ "dist/*"
51
+ ],
52
+ "scripts": {
53
+ "dev": "node ./build.js --watch",
54
+ "build": "node ./build.js && tsc"
55
+ }
56
+ }
package/dist/store.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { AtContextState } from './types';
2
- import type { SetStoreFunction } from 'solid-js/store';
3
- declare const createContextState: () => {
4
- state: AtContextState;
5
- setState: SetStoreFunction<AtContextState>;
6
- };
7
- declare const useContextState: (name: string) => {
8
- state: AtContextState;
9
- setState: SetStoreFunction<AtContextState>;
10
- remove: () => void;
11
- };
12
- export { createContextState, useContextState };