@cocreate/calculate 1.14.7 → 1.16.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/CHANGELOG.md CHANGED
@@ -1,3 +1,31 @@
1
+ # [1.16.0](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.15.0...v1.16.0) (2025-04-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * sanitize and calulate expressionbs ([0710efb](https://github.com/CoCreate-app/CoCreate-calculate/commit/0710efbdd72bdc563e387819e5a7c43a9d5bfb25))
7
+ * update demo ([4d6f6b6](https://github.com/CoCreate-app/CoCreate-calculate/commit/4d6f6b60b68dcdefb1eae64939fde8eea0e45096))
8
+ * update observer observe param to type and and attributeName to attributeFilter ([d50f013](https://github.com/CoCreate-app/CoCreate-calculate/commit/d50f013c0fb3de9e94bad052e11077da042ae223))
9
+
10
+
11
+ ### Features
12
+
13
+ * **calculator:** Add mathematical expression evaluator ([89a3e61](https://github.com/CoCreate-app/CoCreate-calculate/commit/89a3e61c87b7cbcdd42a29583ddfbceafe611df8))
14
+
15
+ # [1.15.0](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.7...v1.15.0) (2024-11-04)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * observer taget has been renamed to selector ([b781427](https://github.com/CoCreate-app/CoCreate-calculate/commit/b7814279f23ab622e624dae0426b6233be6360a8))
21
+ * pretier.config.js and file formating ([c42f51b](https://github.com/CoCreate-app/CoCreate-calculate/commit/c42f51b2b1427b9fe71ef7ae0dfd01154051e51f))
22
+
23
+
24
+ ### Features
25
+
26
+ * add prettier.config.js and format files ([c7c6c3e](https://github.com/CoCreate-app/CoCreate-calculate/commit/c7c6c3e2e02d253759f59b0dd5ecaac8df2e8c75))
27
+ * add prettier.config.js and format files ([d20732a](https://github.com/CoCreate-app/CoCreate-calculate/commit/d20732a680def53c99609f31c8f0c5264ca188ab))
28
+
1
29
  ## [1.14.7](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.6...v1.14.7) (2024-06-12)
2
30
 
3
31
 
package/demo/index.html CHANGED
@@ -1,30 +1,25 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
- <head>
4
- <title>Calculate | CoCreateJS</title>
5
- <!-- CoCreate Favicon -->
6
- <link
7
- rel="icon"
8
- type="image/png"
9
- sizes="32x32"
10
- href="../assets/favicon.ico" />
11
- <link rel="manifest" href="/manifest.webmanifest" />
12
- </head>
13
- <body>
14
- <input class="we" key="total" id="id1" value="12" />
15
- <input class="we" key="total" id="id2" value="13" />
16
- <!--<input id="id3" value="14"><br><br><br>-->
3
+ <head>
4
+ <title>Calculate | CoCreateJS</title>
5
+ <!-- CoCreate Favicon -->
6
+ <link
7
+ rel="icon"
8
+ type="image/png"
9
+ sizes="32x32"
10
+ href="../assets/favicon.ico" />
11
+ <link rel="manifest" href="/manifest.webmanifest" />
12
+ </head>
13
+ <body>
14
+ <input value="12" calculate="$value * 100" />
15
+ <input class="class1" key="total" id="id1" value="12" />
16
+ <input class="class1" key="total" id="id2" value="13" />
17
17
 
18
- <input id="te" calculate="{(#id1)} + {(#id2)}" />
19
- <!--<input calculate="1 + 3 * 5">-->
20
- <input calculate="{[key='total']} + 1" />
21
- <h1 calculate="{[key='total']} + {(#te)}">sum</h1>
18
+ <input id="te" calculate="($selctor #id1) + ($selctor #id2)" />
19
+ <input calculate="($selctor [key='total']) + 1" />
20
+ <h1 calculate="($selctor [key='total']) + ($selctor .class1)">sum</h1>
22
21
 
23
- <!--<h1 calculate="sum[.we]">sum</h1>-->
24
- <!--<h1 calculate="1 + {(#id1)} * 5 + {(#id3)}/{(#id2)} + {(#id2)}"></h1>-->
25
- <!--<h1 calculate="(({#id1} + {#id2})) * {#id3}"></h1>-->
26
-
27
- <!--<script src="../dist/CoCreate-calculate.js"></script>-->
28
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
29
- </body>
22
+ <!--<script src="../dist/CoCreate-calculate.js"></script>-->
23
+ <script src="https://dev.CoCreate.app/dist/CoCreate.js"></script>
24
+ </body>
30
25
  </html>