@novely/core 0.31.0 → 0.31.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.js CHANGED
@@ -298,10 +298,10 @@ var createQueueProcessor = (queue, options) => {
298
298
  const next = (i) => queue.slice(i + 1);
299
299
  for (const [i, item] of queue.entries()) {
300
300
  const [action, ...params] = item;
301
- keep.add(action);
302
301
  if (options.skip.has(item) && item !== options.skipPreserve) {
303
302
  continue;
304
303
  }
304
+ keep.add(action);
305
305
  if (action === "function" || action === "custom") {
306
306
  if (action === "custom" && params[0].callOnlyLatest) {
307
307
  const notLatest = next(i).some(([, func]) => {
@@ -957,11 +957,10 @@ var novely = ({
957
957
  const [path] = stack.value = latest;
958
958
  renderer.ui.showScreen("game");
959
959
  const { queue, skip, skipPreserve } = getActionsFromPath(story, path, false);
960
- const processor = createQueueProcessor(queue, {
960
+ const { run, keep: { keep, characters: characters2, audio } } = createQueueProcessor(queue, {
961
961
  skip,
962
962
  skipPreserve
963
963
  });
964
- const { keep, characters: characters2, audio } = processor.keep;
965
964
  if (previous) {
966
965
  const { queue: prevQueue } = getActionsFromPath(story, previous[0], false);
967
966
  for (let i = prevQueue.length - 1; i > queue.length - 1; i--) {
@@ -981,7 +980,7 @@ var novely = ({
981
980
  });
982
981
  const lastQueueItem = queue.at(-1) || [];
983
982
  const lastQueueItemRequiresUserAction = isSkippedDuringRestore(lastQueueItem[0]) || isUserRequiredAction(lastQueueItem);
984
- await processor.run((item) => {
983
+ await run((item) => {
985
984
  if (!latest)
986
985
  return;
987
986
  if (lastQueueItem === item && lastQueueItemRequiresUserAction) {
@@ -1591,12 +1590,6 @@ var novely = ({
1591
1590
  * ```
1592
1591
  */
1593
1592
  typeEssentials,
1594
- /**
1595
- * @deprecated Renamed into `templateReplace`
1596
- */
1597
- unwrap(content) {
1598
- return templateReplace(content);
1599
- },
1600
1593
  /**
1601
1594
  * Replaces content inside {{braces}} with using global data
1602
1595
  * @example