@novely/core 0.30.3 → 0.31.0

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
@@ -506,7 +506,7 @@ var store = (current, subscribers = /* @__PURE__ */ new Set()) => {
506
506
  return { subscribe, update, set, get };
507
507
  };
508
508
 
509
- // ../../node_modules/.pnpm/@novely+deepmerge@0.0.0/node_modules/@novely/deepmerge/dist/index.js
509
+ // ../deepmerge/dist/index.js
510
510
  var { isArray } = Array;
511
511
  var { hasOwnProperty, propertyIsEnumerable, getOwnPropertySymbols } = Object;
512
512
  var propertyIsOnObject = (object, property) => {
@@ -517,7 +517,9 @@ var propertyIsOnObject = (object, property) => {
517
517
  }
518
518
  };
519
519
  var propertyIsUnsafe = (target, key) => {
520
- return propertyIsOnObject(target, key) && !(hasOwnProperty.call(target, key) && propertyIsEnumerable.call(target, key));
520
+ return propertyIsOnObject(target, key) && // Properties are safe to merge if they don't exist in the target yet,
521
+ !(hasOwnProperty.call(target, key) && // unsafe if they exist up the prototype chain,
522
+ propertyIsEnumerable.call(target, key));
521
523
  };
522
524
  var getEnumerableOwnPropertySymbols = (target) => {
523
525
  if (!getOwnPropertySymbols)
@@ -770,6 +772,9 @@ var novely = ({
770
772
  };
771
773
  const action = new Proxy({}, {
772
774
  get(_, action2) {
775
+ if (action2 in renderer.actions) {
776
+ return renderer.actions[action2];
777
+ }
773
778
  return (...props) => {
774
779
  if (preloadAssets === "blocking") {
775
780
  if (action2 === "showBackground") {
@@ -1519,6 +1524,12 @@ var novely = ({
1519
1524
  });
1520
1525
  return void 0;
1521
1526
  };
1527
+ const typeEssentials = {
1528
+ l: null,
1529
+ s: null,
1530
+ d: null,
1531
+ c: null
1532
+ };
1522
1533
  return {
1523
1534
  /**
1524
1535
  * Function to set game script
@@ -1567,6 +1578,19 @@ var novely = ({
1567
1578
  * ```
1568
1579
  */
1569
1580
  data,
1581
+ /**
1582
+ * Used in combination with type utilities
1583
+ *
1584
+ * @example
1585
+ * ```ts
1586
+ * import type { ConditionParams, StateFunction } from '@novely/core';
1587
+ *
1588
+ * const conditionCheck = (state: StateFunction<ConditionParams<typeof engine.typeEssintials>>) => {
1589
+ * return state.age >= 18;
1590
+ * }
1591
+ * ```
1592
+ */
1593
+ typeEssentials,
1570
1594
  /**
1571
1595
  * @deprecated Renamed into `templateReplace`
1572
1596
  */