olova 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/olova.js +18 -18
  2. package/package.json +1 -1
package/dist/olova.js CHANGED
@@ -30,7 +30,7 @@ class olova {
30
30
  }
31
31
 
32
32
  defineCustomElement(name) {
33
- const olova = this;
33
+ const deshi = this;
34
34
  class CustomElement extends HTMLElement {
35
35
  connectedCallback() {
36
36
  this.render();
@@ -38,7 +38,7 @@ class olova {
38
38
 
39
39
  render() {
40
40
  const props = this.getProps();
41
- const componentFunction = olova.components[name];
41
+ const componentFunction = deshi.components[name];
42
42
  const renderedContent = componentFunction(props);
43
43
 
44
44
  const tempContainer = document.createElement("div");
@@ -49,9 +49,9 @@ class olova {
49
49
 
50
50
  if (renderedElement) {
51
51
  parent.replaceChild(renderedElement, this);
52
- olova.applyDirectivesToElement(renderedElement);
53
- olova.initReactiveSystem();
54
- olova.runEffects();
52
+ deshi.applyDirectivesToElement(renderedElement);
53
+ deshi.initReactiveSystem();
54
+ deshi.runEffects();
55
55
  }
56
56
  }
57
57
 
@@ -64,7 +64,7 @@ class olova {
64
64
  }
65
65
 
66
66
  static get observedAttributes() {
67
- return Object.keys(olova.components[name]({}) || {});
67
+ return Object.keys(deshi.components[name]({}) || {});
68
68
  }
69
69
 
70
70
  attributeChangedCallback(name, oldValue, newValue) {
@@ -933,9 +933,9 @@ class olova {
933
933
  }
934
934
 
935
935
  static init() {
936
- const olova = new olova();
937
- window.$refs = olova.$refs;
938
- window.$ = (selector) => olova.$(selector);
936
+ const deshi = new olova();
937
+ window.$refs = deshi.$refs;
938
+ window.$ = (selector) => deshi.$(selector);
939
939
  // Create the useSignal function
940
940
  const useSignalFunction = (obj = {}) => {
941
941
  Object.assign(window.useSignal, obj);
@@ -946,37 +946,37 @@ class olova {
946
946
  if (key === "call" || key === "apply") {
947
947
  return Reflect.get(target, key);
948
948
  }
949
- olova.track(key);
949
+ deshi.track(key);
950
950
  return Reflect.get(target, key);
951
951
  },
952
952
  set(target, key, value) {
953
953
  if (Reflect.get(target, key) !== value) {
954
954
  Reflect.set(target, key, value);
955
- olova.notify(key);
956
- olova.runEffects();
955
+ deshi.notify(key);
956
+ deshi.runEffects();
957
957
  }
958
958
  return true;
959
959
  },
960
960
  });
961
961
 
962
962
  document.addEventListener("DOMContentLoaded", () => {
963
- olova.renderTemplate();
963
+ deshi.renderTemplate();
964
964
  });
965
965
 
966
966
  window.addEventListener("beforeunload", () => {
967
- olova.cleanup();
967
+ deshi.cleanup();
968
968
  });
969
969
 
970
970
  window.useEffect = (callback) => {
971
- olova.useEffect(callback);
971
+ deshi.useEffect(callback);
972
972
  };
973
973
  window.component = (name, componentFunction) => {
974
- olova.registerComponent(name, componentFunction);
974
+ deshi.registerComponent(name, componentFunction);
975
975
  };
976
976
 
977
- window.plugin = (name, handler) => olova.registerPlugin(name, handler);
977
+ window.plugin = (name, handler) => deshi.registerPlugin(name, handler);
978
978
 
979
- return olova;
979
+ return deshi;
980
980
  }
981
981
 
982
982
  renderTemplate() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "olova",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A lightweight JavaScript framework for building reactive applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {