@novely/solid-renderer 0.24.1 → 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)) {
@@ -4105,32 +4166,31 @@ var createAudio = (storageData) => {
4105
4166
  const getVolume = (type) => {
4106
4167
  return storageData.get().meta[TYPE_META_MAP[type]];
4107
4168
  };
4108
- const getHowl = (type, src, loop) => {
4169
+ const getHowl = (type, src) => {
4109
4170
  const kind = type === "voice" ? "voices" : type;
4110
4171
  const cached = store[kind][src];
4111
4172
  if (cached)
4112
4173
  return cached;
4113
4174
  const howl = new import_howler.Howl({
4114
4175
  src,
4115
- volume: getVolume(type),
4116
- loop
4176
+ volume: getVolume(type)
4117
4177
  });
4118
4178
  store[kind][src] = howl;
4119
4179
  return howl;
4120
4180
  };
4121
4181
  const context = {
4122
- music(src, method, loop = method === "music") {
4123
- const resource = getHowl(method, src, loop);
4124
- resource.loop(loop);
4182
+ music(src, method) {
4183
+ const resource = getHowl(method, src);
4125
4184
  this.start();
4126
4185
  return {
4127
4186
  pause() {
4128
4187
  resource.fade(getVolume(method), 0, 300);
4129
4188
  resource.once("fade", resource.pause);
4130
4189
  },
4131
- play() {
4190
+ play(loop) {
4132
4191
  if (resource.playing())
4133
4192
  return;
4193
+ resource.loop(loop);
4134
4194
  resource.play();
4135
4195
  resource.fade(0, getVolume(method), 300);
4136
4196
  },
@@ -4143,7 +4203,7 @@ var createAudio = (storageData) => {
4143
4203
  voice(source) {
4144
4204
  this.start();
4145
4205
  this.voiceStop();
4146
- const resource = store.voice = getHowl("voice", source, false);
4206
+ const resource = store.voice = getHowl("voice", source);
4147
4207
  resource.once("end", () => {
4148
4208
  store.voice = void 0;
4149
4209
  });
@@ -4364,62 +4424,85 @@ var handleBackgroundAction = ($contextState, background) => {
4364
4424
  const { clear } = $contextState.get().background;
4365
4425
  clear && clear();
4366
4426
  if (typeof background === "string") {
4367
- $contextState.setKey("background.background", background);
4427
+ $contextState.mutate((s) => s.background.background, background);
4368
4428
  return;
4369
4429
  }
4370
4430
  const { dispose: dispose2 } = useBackground(background, (value) => {
4371
- $contextState.setKey("background.background", value);
4431
+ $contextState.mutate((s) => s.background.background, value);
4372
4432
  });
4373
- $contextState.setKey("background.clear", dispose2);
4433
+ $contextState.mutate((s) => s.background.clear, () => dispose2);
4374
4434
  };
4375
4435
  var handleDialogAction = ($contextState, content, name, character, emotion, resolve) => {
4376
- $contextState.setKey("dialog", {
4377
- content,
4378
- name,
4379
- miniature: {
4380
- character,
4381
- emotion
4382
- },
4383
- visible: true,
4384
- resolve
4385
- });
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
+ );
4386
4449
  };
4387
4450
  var handleChoiceAction = ($contextState, label, choices, resolve) => {
4388
- $contextState.setKey("choice", { choices, label, resolve, visible: true });
4451
+ $contextState.mutate(
4452
+ (s) => s.choice,
4453
+ { choices, label, resolve, visible: true }
4454
+ );
4389
4455
  };
4390
4456
  var handleClearAction = ($rendererState, $contextState, context, keep, keepCharacters) => {
4391
- $rendererState.setKey("exitPromptShown", false);
4457
+ $rendererState.mutate((s) => s.exitPromptShown, false);
4392
4458
  if (!keep.has("showBackground")) {
4393
- $contextState.setKey("background.background", "#000");
4459
+ $contextState.mutate((s) => s.background.background, "#000");
4394
4460
  }
4395
4461
  if (!keep.has("choice")) {
4396
- $contextState.setKey("choice", {
4397
- choices: [],
4398
- visible: false,
4399
- label: ""
4400
- });
4462
+ $contextState.mutate(
4463
+ (s) => s.choice,
4464
+ {
4465
+ choices: [],
4466
+ visible: false,
4467
+ label: ""
4468
+ }
4469
+ );
4401
4470
  }
4402
4471
  if (!keep.has("input")) {
4403
- $contextState.setKey("input", {
4404
- element: null,
4405
- label: "",
4406
- visible: false,
4407
- error: ""
4408
- });
4472
+ $contextState.mutate(
4473
+ (s) => s.input,
4474
+ {
4475
+ element: null,
4476
+ label: "",
4477
+ visible: false,
4478
+ error: ""
4479
+ }
4480
+ );
4409
4481
  }
4410
4482
  if (!keep.has("dialog")) {
4411
- $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
+ );
4412
4492
  }
4413
4493
  if (!keep.has("text")) {
4414
- $contextState.setKey("text", { content: "" });
4494
+ $contextState.mutate((s) => s.text, { content: "" });
4415
4495
  }
4416
4496
  const { characters, custom } = $contextState.get();
4417
4497
  for (const character of Object.keys(characters)) {
4418
4498
  if (!keepCharacters.has(character)) {
4419
- $contextState.setKey(`characters.${character}`, {
4420
- style: void 0,
4421
- visible: false
4422
- });
4499
+ $contextState.mutate(
4500
+ (s) => s.characters[character],
4501
+ {
4502
+ style: void 0,
4503
+ visible: false
4504
+ }
4505
+ );
4423
4506
  }
4424
4507
  }
4425
4508
  for (const [id, handler] of Object.entries(custom)) {
@@ -4428,7 +4511,7 @@ var handleClearAction = ($rendererState, $contextState, context, keep, keepChara
4428
4511
  if (context.meta.goingBack && handler.fn.skipClearOnGoingBack)
4429
4512
  continue;
4430
4513
  handler.clear();
4431
- $contextState.setKey(`custom.${id}`, void 0);
4514
+ $contextState.mutate((s) => s.custom[id], void 0);
4432
4515
  }
4433
4516
  };
4434
4517
  var handleCustomAction = ($contextState, options, context, fn, resolve) => {
@@ -4442,7 +4525,7 @@ var handleCustomAction = ($contextState, options, context, fn, resolve) => {
4442
4525
  let store = {};
4443
4526
  const clearManager = () => {
4444
4527
  clear();
4445
- $contextState.setKey(`custom.${fn.key}`, void 0);
4528
+ $contextState.mutate((s) => s.custom[fn.key], void 0);
4446
4529
  };
4447
4530
  const createElement = () => {
4448
4531
  const div = document.createElement("div");
@@ -4461,12 +4544,15 @@ var handleCustomAction = ($contextState, options, context, fn, resolve) => {
4461
4544
  clear = cb;
4462
4545
  }
4463
4546
  };
4464
- $contextState.setKey(`custom.${fn.key}`, {
4465
- dom: element,
4466
- fn,
4467
- getReturn,
4468
- clear: clearManager
4469
- });
4547
+ $contextState.mutate(
4548
+ (s) => s.custom[fn.key],
4549
+ {
4550
+ dom: element,
4551
+ fn,
4552
+ getReturn,
4553
+ clear: clearManager
4554
+ }
4555
+ );
4470
4556
  return getReturn;
4471
4557
  };
4472
4558
  const result = fn({
@@ -4485,11 +4571,11 @@ var handleClearCustomAction = ($contextState, fn) => {
4485
4571
  data.clear();
4486
4572
  };
4487
4573
  var handleTextAction = ($contextState, content, resolve) => {
4488
- $contextState.setKey("text", { content, resolve });
4574
+ $contextState.mutate((s) => s.text, { content, resolve });
4489
4575
  };
4490
4576
  var handleInputAction = ($contextState, options, context, label, onInput, setup, resolve) => {
4491
4577
  const error = (value) => {
4492
- $contextState.setKey("input.error", value);
4578
+ $contextState.mutate((s) => s.input.error, value);
4493
4579
  };
4494
4580
  const onInputHandler = (event) => {
4495
4581
  let value;
@@ -4512,14 +4598,17 @@ var handleInputAction = ($contextState, options, context, label, onInput, setup,
4512
4598
  input.setAttribute("required", "true");
4513
4599
  input.setAttribute("autocomplete", "off");
4514
4600
  !context.meta.preview && input.addEventListener("input", onInputHandler);
4515
- setup(input, (callback) => $contextState.setKey("input.cleanup", callback));
4516
- $contextState.setKey("input", {
4517
- element: input,
4518
- label,
4519
- error: "",
4520
- visible: true,
4521
- resolve
4522
- });
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
+ );
4523
4612
  !context.meta.preview && input.dispatchEvent(new InputEvent("input", { bubbles: true }));
4524
4613
  };
4525
4614
  var handleVibrateAction = vibrate;
@@ -5089,7 +5178,7 @@ var Save = (props) => {
5089
5178
  };
5090
5179
  delegateEvents(["click"]);
5091
5180
 
5092
- // ../typewriter/dist/index.js
5181
+ // ../../node_modules/.pnpm/@novely+typewriter@0.5.1/node_modules/@novely/typewriter/dist/index.js
5093
5182
  var defaultSpeed = () => {
5094
5183
  return Math.min(90 * Math.random() + 100, 90);
5095
5184
  };
@@ -5802,12 +5891,6 @@ var Settings = () => {
5802
5891
  const language = () => data.storageData().meta[0];
5803
5892
  const textSpeed = () => data.storageData().meta[1];
5804
5893
  const volume = (kind) => data.storageData().meta[kind];
5805
- const getLanguageName = (lang) => {
5806
- const intl = new Intl.DisplayNames([language()], {
5807
- type: "language"
5808
- });
5809
- return intl.of(lang) || lang;
5810
- };
5811
5894
  const onLanguageSelect = ({
5812
5895
  currentTarget: {
5813
5896
  value
@@ -5864,7 +5947,7 @@ var Settings = () => {
5864
5947
  children: (lang) => (() => {
5865
5948
  const _el$33 = _tmpl$29();
5866
5949
  _el$33.value = lang;
5867
- insert(_el$33, () => capitalize(getLanguageName(lang)));
5950
+ insert(_el$33, () => data.options.getLanguageDisplayName(lang));
5868
5951
  createRenderEffect(() => _el$33.selected = lang === language());
5869
5952
  return _el$33;
5870
5953
  })()
@@ -6096,7 +6179,7 @@ var createSolidRenderer = ({
6096
6179
  },
6097
6180
  append(className2, style2) {
6098
6181
  clearTimeout($contextState.get().characters[character]?.hideTimeoutId);
6099
- $contextState.setKey(`characters.${character}`, {
6182
+ $contextState.mutate((s) => s.characters[character], {
6100
6183
  style: style2,
6101
6184
  visible: true
6102
6185
  });
@@ -6112,19 +6195,19 @@ var createSolidRenderer = ({
6112
6195
  remove(className2, style2, duration, restoring) {
6113
6196
  return new Promise((resolve) => {
6114
6197
  if (restoring) {
6115
- $contextState.setKey(`characters.${character}.visible`, false);
6198
+ $contextState.mutate((s) => s.characters[character].visible, false);
6116
6199
  resolve();
6117
6200
  return;
6118
6201
  }
6119
6202
  const timeoutId = setTimeout(() => {
6120
- $contextState.setKey(`characters.${character}.visible`, false);
6203
+ $contextState.mutate((s) => s.characters[character].visible, false);
6121
6204
  resolve();
6122
6205
  }, duration);
6123
6206
  if (className2) {
6124
6207
  chars[character].canvas.className = className2;
6125
6208
  }
6126
- $contextState.setKey(`characters.${character}.style`, style2);
6127
- $contextState.setKey(`characters.${character}.hideTimeoutId`, timeoutId);
6209
+ $contextState.mutate((s) => s.characters[character].style, style2);
6210
+ $contextState.mutate((s) => s.characters[character].hideTimeoutId, timeoutId);
6128
6211
  });
6129
6212
  },
6130
6213
  animate(timeout, classes) {
@@ -6188,19 +6271,19 @@ var createSolidRenderer = ({
6188
6271
  return $contextState.get().meta.restoring;
6189
6272
  },
6190
6273
  set restoring(value) {
6191
- $contextState.setKey("meta.restoring", value);
6274
+ $contextState.mutate((s) => s.meta.restoring, value);
6192
6275
  },
6193
6276
  get preview() {
6194
6277
  return $contextState.get().meta.preview;
6195
6278
  },
6196
6279
  set preview(value) {
6197
- $contextState.setKey("meta.preview", value);
6280
+ $contextState.mutate((s) => s.meta.preview, value);
6198
6281
  },
6199
6282
  get goingBack() {
6200
6283
  return $contextState.get().meta.goingBack;
6201
6284
  },
6202
6285
  set goingBack(value) {
6203
- $contextState.setKey("meta.goingBack", value);
6286
+ $contextState.mutate((s) => s.meta.goingBack, value);
6204
6287
  }
6205
6288
  }
6206
6289
  };
@@ -6212,19 +6295,19 @@ var createSolidRenderer = ({
6212
6295
  },
6213
6296
  ui: {
6214
6297
  showScreen(name) {
6215
- $rendererState.setKey("screen", name);
6298
+ $rendererState.mutate((s) => s.screen, name);
6216
6299
  },
6217
6300
  getScreen() {
6218
6301
  return $rendererState.get().screen;
6219
6302
  },
6220
6303
  showLoading() {
6221
- $rendererState.setKey("loadingShown", true);
6304
+ $rendererState.mutate((s) => s.loadingShown, true);
6222
6305
  },
6223
6306
  hideLoading() {
6224
- $rendererState.setKey("loadingShown", false);
6307
+ $rendererState.mutate((s) => s.loadingShown, false);
6225
6308
  },
6226
6309
  showExitPrompt() {
6227
- $rendererState.setKey("exitPromptShown", true);
6310
+ $rendererState.mutate((s) => s.exitPromptShown, true);
6228
6311
  },
6229
6312
  start: createStartFunction(() => {
6230
6313
  const Root = createRootComponent({
@@ -6268,10 +6351,10 @@ var createSolidRenderer = ({
6268
6351
  return renderer;
6269
6352
  },
6270
6353
  registerScreen(name, screen) {
6271
- $rendererState.setKey(`screens.${name}`, screen);
6354
+ $rendererState.mutate((s) => s.screens[name], () => screen);
6272
6355
  },
6273
6356
  registerMainmenuItem(fn) {
6274
- storeUpdate($rendererState, "mainmenu", (mainmenu) => [...mainmenu, fn]);
6357
+ $rendererState.mutate((s) => s.mainmenu, (mainmenu) => [...mainmenu, fn]);
6275
6358
  }
6276
6359
  };
6277
6360
  };
package/package.json CHANGED
@@ -1,56 +1,56 @@
1
1
  {
2
- "name": "@novely/solid-renderer",
3
- "version": "0.24.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
- "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 };