@cocreate/utils 1.42.2 → 1.44.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.
Files changed (68) hide show
  1. package/.github/FUNDING.yml +3 -0
  2. package/.github/workflows/automated.yml +56 -0
  3. package/.github/workflows/manual.yml +43 -0
  4. package/CHANGELOG.md +2125 -0
  5. package/CoCreate.config.js +23 -0
  6. package/demo/index.html +23 -0
  7. package/docs/index.html +331 -0
  8. package/package.json +11 -29
  9. package/prettier.config.js +16 -0
  10. package/release.config.js +30 -0
  11. package/src/dataQuery.js +1 -0
  12. package/src/index.js +90 -70
  13. package/src/operators.ast.js +287 -0
  14. package/src/operators.js +450 -89
  15. package/src/operators.v1.js +687 -0
  16. package/src/queryElements.js +7 -9
  17. package/webpack.config.js +65 -0
  18. package/dist/cjs/ObjectId.js +0 -54
  19. package/dist/cjs/attributes.js +0 -64
  20. package/dist/cjs/checkValue.js +0 -26
  21. package/dist/cjs/clickedElement.js +0 -48
  22. package/dist/cjs/core.js +0 -33
  23. package/dist/cjs/createUpdate.js +0 -188
  24. package/dist/cjs/cssPath.js +0 -60
  25. package/dist/cjs/dataQuery.js +0 -280
  26. package/dist/cjs/dom.js +0 -29
  27. package/dist/cjs/domParser.js +0 -44
  28. package/dist/cjs/dotNotationToObject.js +0 -103
  29. package/dist/cjs/escapeHtml.js +0 -25
  30. package/dist/cjs/getRelativePath.js +0 -39
  31. package/dist/cjs/getValueFromObject.js +0 -41
  32. package/dist/cjs/index.js +0 -112
  33. package/dist/cjs/init-browser.js +0 -4
  34. package/dist/cjs/isValidDate.js +0 -32
  35. package/dist/cjs/objectToDotNotation.js +0 -53
  36. package/dist/cjs/objectToSearchParams.js +0 -42
  37. package/dist/cjs/operators copy.js +0 -562
  38. package/dist/cjs/operators.js +0 -480
  39. package/dist/cjs/parseTextToHtml.js +0 -27
  40. package/dist/cjs/queryElements.js +0 -155
  41. package/dist/cjs/safeParse.js +0 -169
  42. package/dist/cjs/uid.js +0 -34
  43. package/dist/esm/ObjectId.js +0 -35
  44. package/dist/esm/attributes.js +0 -45
  45. package/dist/esm/checkValue.js +0 -7
  46. package/dist/esm/clickedElement.js +0 -29
  47. package/dist/esm/core.js +0 -14
  48. package/dist/esm/createUpdate.js +0 -185
  49. package/dist/esm/cssPath.js +0 -41
  50. package/dist/esm/dataQuery.js +0 -261
  51. package/dist/esm/dom.js +0 -10
  52. package/dist/esm/domParser.js +0 -25
  53. package/dist/esm/dotNotationToObject.js +0 -84
  54. package/dist/esm/escapeHtml.js +0 -6
  55. package/dist/esm/getRelativePath.js +0 -20
  56. package/dist/esm/getValueFromObject.js +0 -22
  57. package/dist/esm/index.js +0 -93
  58. package/dist/esm/init-browser.js +0 -4
  59. package/dist/esm/isValidDate.js +0 -13
  60. package/dist/esm/objectToDotNotation.js +0 -34
  61. package/dist/esm/objectToSearchParams.js +0 -23
  62. package/dist/esm/operators copy.js +0 -543
  63. package/dist/esm/operators.js +0 -461
  64. package/dist/esm/package.json +0 -3
  65. package/dist/esm/parseTextToHtml.js +0 -8
  66. package/dist/esm/queryElements.js +0 -136
  67. package/dist/esm/safeParse.js +0 -150
  68. package/dist/esm/uid.js +0 -15
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ "organization_id": "",
3
+ "key": "",
4
+ "host": "",
5
+ "sources": [
6
+ {
7
+ "array": "files",
8
+ "object": {
9
+ "_id": "6143fc94829b690010a5f339",
10
+ "name": "index.html",
11
+ "path": "/docs/utils",
12
+ "pathname": "/docs/utils/index.html",
13
+ "src": "{{./docs/index.html}}",
14
+ "host": [
15
+ "*"
16
+ ],
17
+ "directory": "utils",
18
+ "content-type": "{{content-type}}",
19
+ "public": "true"
20
+ }
21
+ }
22
+ ]
23
+ };
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <title>Utils | CoCreateJS</title>
5
+
6
+ <!-- CoCreate Favicon -->
7
+ <link
8
+ rel="icon"
9
+ type="image/png"
10
+ sizes="32x32"
11
+ href="../assets/favicon.ico" />
12
+ <!-- CoCreate CSS CDN -->
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.cocreate.app/action/latest/CoCreate-action.min.css"
16
+ type="text/css" />
17
+ <link rel="manifest" href="/manifest.webmanifest" />
18
+ </head>
19
+ <body>
20
+ <!--<script src="../dist/CoCreate-utils.js"></script>-->
21
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
22
+ </body>
23
+ </html>
@@ -0,0 +1,331 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
7
+ <title>CoCreate-utils Documentation | CoCreateJS</title>
8
+ <link
9
+ rel="icon"
10
+ type="image/png"
11
+ sizes="32x32"
12
+ href="https://cocreate.app/images/favicon.ico" />
13
+ <meta
14
+ name="description"
15
+ content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
16
+ <meta
17
+ name="keywords"
18
+ content="helper classes, utility classes, css framework, css library, inline style classes" />
19
+ <meta name="robots" content="index,follow" />
20
+ <meta
21
+ property="og:image"
22
+ content="https://cdn.cocreate.app/docs/utils.png" />
23
+
24
+ <link
25
+ rel="stylesheet"
26
+ href="../index.css"
27
+ array="files"
28
+ object="60888216117c640e7596303f"
29
+ key="src"
30
+ type="text/css"
31
+ save="true" />
32
+ <link rel="manifest" href="/manifest.webmanifest" />
33
+ </head>
34
+
35
+ <body>
36
+ <!-- Navbar -->
37
+ <nav
38
+ class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
39
+ content_id="content"
40
+ scroll="sticky-nav,"
41
+ scroll-up="5"
42
+ scroll-down="5"
43
+ path="../"
44
+ src="../components/navbar.html"></nav>
45
+ <sidenav
46
+ id="menuL"
47
+ class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
48
+ resizable
49
+ resize-query="[content_id='content']"
50
+ resize-property="margin-left"
51
+ resize-value="width">
52
+ <menu
53
+ array="files"
54
+ object="603717b07de7fb350ae9fec8"
55
+ key="src"></menu>
56
+ <div resize="right"></div>
57
+ </sidenav>
58
+ <main
59
+ class="padding-top:15px padding:15px@lg@xl"
60
+ content_id="content"
61
+ id="cocreate-utils">
62
+ <div
63
+ class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
64
+ <div class="display:flex align-items:center">
65
+ <h2>CoCreate-utils</h2>
66
+ </div>
67
+ <div
68
+ class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
69
+ <div
70
+ class="display:flex align-items:center transition:0.3s padding-left:10px"
71
+ share-network="true"
72
+ share-text="Enter decription here"
73
+ share-title="testing im a title"
74
+ share-height="600"
75
+ share-width="700"
76
+ share-media="https://cdn.cocreate.app/docs/utils.png"
77
+ hover="display:block!important"
78
+ hover-query=".social-networks">
79
+ <div class="display:none social-networks">
80
+ <a
81
+ class="margin-right:15px"
82
+ share-network="twitter"
83
+ title="Share on twitter"
84
+ ><i src="/assets/svg/twitter.svg"></i
85
+ ></a>
86
+ <a
87
+ class="margin-right:15px"
88
+ share-network="facebook"
89
+ title="Share on Facebook"
90
+ ><i src="/assets/svg/facebook.svg"></i
91
+ ></a>
92
+ <a
93
+ class="margin-right:15px"
94
+ share-network="instagram"
95
+ title="Share on instagram"
96
+ ><i src="/assets/svg/instagram.svg"></i
97
+ ></a>
98
+ </div>
99
+ <a
100
+ class="margin-right:15px"
101
+ share-network="share"
102
+ title="Share on share"
103
+ ><i src="/assets/svg/share-alt.svg"></i
104
+ ></a>
105
+ </div>
106
+ <a
107
+ href="https://github.com/CoCreate-app/CoCreate-utils"
108
+ target="_blank"
109
+ class="margin-right:15px"
110
+ ><i src="/assets/svg/github.svg"></i
111
+ ></a>
112
+ </div>
113
+ </div>
114
+ <h1
115
+ class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
116
+ A headless vinilla javascript micro component. Easy
117
+ configuration using HTML5 attributes or Javscript api.
118
+ </h1>
119
+ <div id="utils-section" class="display:flex flex-wrap:wrap">
120
+ <div
121
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
122
+ <div
123
+ id="utils-install"
124
+ class="border-bottom:1px_solid_lightgrey"
125
+ scroll
126
+ scroll-intersect="color:dodgerblue"
127
+ scroll-query="#utils-install-section">
128
+ <span
129
+ class="display:flex align-items:center width:fit-content"
130
+ hover="display:block!important"
131
+ hover-query="[href='#utils-install']">
132
+ <h2 class="padding:5px_0px">Install</h2>
133
+ <a
134
+ class="margin-left:10px display:none"
135
+ href="#utils-install"
136
+ ><i src="/assets/svg/link.svg"></i
137
+ ></a>
138
+ </span>
139
+ </div>
140
+ <pre
141
+ class="margin-top:15px"><code class="language-bash">npm i @cocreate/utils</code></pre>
142
+ <p class="padding:10px_0px line-height:1.5">
143
+ Or you can use cdn link:
144
+ </p>
145
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/utils/latest/CoCreate-utils.min.js&lt;/script&gt;</code></pre>
146
+
147
+ <div
148
+ id="utils-usage"
149
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
150
+ scroll
151
+ scroll-intersect="color:dodgerblue"
152
+ scroll-query="#utils-usage-section">
153
+ <span
154
+ class="display:flex align-items:center width:fit-content"
155
+ hover="display:block!important"
156
+ hover-query="[href='#utils-usage']">
157
+ <h2 class="padding:5px_0px">Usage</h2>
158
+ <a
159
+ class="margin-left:10px display:none"
160
+ href="#utils-usage"
161
+ ><i src="/assets/svg/link.svg"></i
162
+ ></a>
163
+ </span>
164
+ </div>
165
+ <p class="padding:10px_0px line-height:1.5">
166
+ utils usage content
167
+ </p>
168
+ <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
169
+
170
+ <div
171
+ id="utils-attributes"
172
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
173
+ scroll
174
+ scroll-intersect="color:dodgerblue"
175
+ scroll-query="#utils-attributes-section">
176
+ <span
177
+ class="display:flex align-items:center width:fit-content"
178
+ hover="display:block!important"
179
+ hover-query="[href='#utils-attributes']">
180
+ <h2 class="padding:5px_0px">Attributes</h2>
181
+ <a
182
+ class="margin-left:10px display:none"
183
+ href="#utils-attributes"
184
+ ><i src="/assets/svg/link.svg"></i
185
+ ></a>
186
+ </span>
187
+ </div>
188
+ <ul class="list-style-type:none">
189
+ <li
190
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
191
+ <h4>
192
+ <span>utils</span>
193
+ <span class="cocreate-badge success"
194
+ >string</span
195
+ >
196
+ <span class="cocreate-badge warning"
197
+ >optional</span
198
+ >
199
+ </h4>
200
+ <p>utils-attribute</p>
201
+ </li>
202
+ <li
203
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
204
+ <h4>
205
+ <span>utils</span>
206
+ <span class="cocreate-badge success"
207
+ >string</span
208
+ >
209
+ <span class="cocreate-badge warning"
210
+ >optional</span
211
+ >
212
+ </h4>
213
+ <p>utils-attribute</p>
214
+ </li>
215
+ </ul>
216
+ </div>
217
+
218
+ <div
219
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
220
+ <!-- SandBox -->
221
+ <div
222
+ id="utils-demo"
223
+ class="border-bottom:1px_solid_lightgrey"
224
+ scroll
225
+ scroll-intersect="color:dodgerblue"
226
+ scroll-query="#utils-demo-section">
227
+ <span
228
+ class="display:flex align-items:center width:fit-content"
229
+ hover="display:block!important"
230
+ hover-query="[href='#utils-demo']">
231
+ <h2 class="padding:5px_0px">Demo</h2>
232
+ <a
233
+ class="margin-left:10px display:none"
234
+ href="#utils-demo"
235
+ ><i src="/assets/svg/link.svg"></i
236
+ ></a>
237
+ </span>
238
+ </div>
239
+ <div
240
+ class="position:sticky top:0 padding:10px_0px height:100vh">
241
+ <!-- SandBox -->
242
+ <div
243
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
244
+ id="playground">
245
+ <div
246
+ id="demo-code"
247
+ resizable
248
+ class="position:relative height:50%">
249
+ <textarea
250
+ type="code"
251
+ lang="html"
252
+ array="demos"
253
+ object=""
254
+ key="demo"
255
+ save="false"
256
+ id="demo"
257
+ input-query=".demopreview"
258
+ input-attribute="value"
259
+ input-events="input, onload"
260
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
261
+ <div
262
+ resize="bottom"
263
+ class="background:lightgrey"></div>
264
+ </div>
265
+
266
+ <div
267
+ id="demo-preview"
268
+ class="position:relative overflow:auto background-color:white">
269
+ <div class="demopreview padding:20px"></div>
270
+ </div>
271
+
272
+ <div
273
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
274
+ <a
275
+ class="margin-right:10px"
276
+ id="eye"
277
+ show="#eye-slash"
278
+ hide="#eye, #demo-preview"
279
+ toggle="code-height"
280
+ toggle-query="#demo-code"
281
+ ><i
282
+ class="height:18px"
283
+ src="/assets/svg/eye.svg"></i
284
+ ></a>
285
+ <a
286
+ class="margin-right:10px"
287
+ hidden
288
+ id="eye-slash"
289
+ show="#eye, #demo-preview"
290
+ hide="#eye-slash"
291
+ toggle="code-height"
292
+ toggle-query="#demo-code"
293
+ ><i src="/assets/svg/eye-slash.svg"></i
294
+ ></a>
295
+ <a
296
+ class="margin-right:10px"
297
+ id="code"
298
+ show="#code-slash"
299
+ hide="#code, #demo-code"
300
+ ><i src="/assets/svg/code.svg"></i
301
+ ></a>
302
+ <a
303
+ class="margin-right:10px"
304
+ hidden
305
+ id="code-slash"
306
+ show="#code, #demo-code"
307
+ hide="#code-slash"
308
+ ><i
309
+ class="height:18px"
310
+ src="/assets/svg/code.svg"></i
311
+ ></a>
312
+ <a
313
+ class="margin-right:5px"
314
+ fullscreen
315
+ fullscreen-query="#playground"></a>
316
+ </div>
317
+ </div>
318
+ <!-- End SandBox -->
319
+ </div>
320
+ </div>
321
+ </div>
322
+ <button
323
+ href="https://github.com/CoCreate-app/CoCreate-utils/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
324
+ target="_blank"
325
+ class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
326
+ <i src="../assets/svg/pencil-alt.svg"></i>
327
+ </button>
328
+ </main>
329
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
330
+ </body>
331
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/utils",
3
- "version": "1.42.2",
3
+ "version": "1.44.0",
4
4
  "description": "A simple utils component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "utils",
@@ -17,14 +17,8 @@
17
17
  },
18
18
  "scripts": {
19
19
  "start": "npx webpack --config webpack.config.js",
20
- "build:umd": "npx webpack --mode=production --config webpack.config.js",
21
- "build:modules:esm": "npx esbuild src/*.js --outdir=dist/esm --format=esm --target=es2017 && node -e \"require('fs').writeFileSync('dist/esm/package.json', '{\\n \\\"type\\\": \\\"module\\\"\\n}\\n')\"",
22
- "build:modules:cjs": "npx esbuild src/*.js --outdir=dist/cjs --format=cjs --target=node18",
23
- "build:modules": "npm run build:modules:esm && npm run build:modules:cjs",
24
- "build": "npm run build:umd && npm run build:modules",
25
- "dev": "npx webpack --config webpack.config.js --watch",
26
- "prepare": "npm run build:modules",
27
- "postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""
20
+ "build": "npx webpack --mode=production --config webpack.config.js",
21
+ "dev": "npx webpack --config webpack.config.js --watch"
28
22
  },
29
23
  "repository": {
30
24
  "type": "git",
@@ -40,27 +34,10 @@
40
34
  "type": "GitHub Sponsors ❤",
41
35
  "url": "https://github.com/sponsors/CoCreate-app"
42
36
  },
43
- "main": "./dist/cjs/index.js",
44
- "module": "./dist/esm/index.js",
45
- "files": [
46
- "dist",
47
- "src",
48
- "README.md",
49
- "LICENSE"
50
- ],
51
- "exports": {
52
- ".": {
53
- "import": "./dist/esm/index.js",
54
- "require": "./dist/cjs/index.js"
55
- },
56
- "./package.json": "./package.json"
57
- },
58
- "sideEffects": [
59
- "./src/init-browser.js",
60
- "./dist/CoCreate-utils.js",
61
- "./dist/CoCreate-utils.min.js"
62
- ],
37
+ "type": "module",
38
+ "main": "./src/index.js",
63
39
  "devDependencies": {
40
+ "@cocreate/webpack": "^1.4.3",
64
41
  "css-loader": "^5.1.3",
65
42
  "esbuild": "^0.25.2",
66
43
  "esbuild-loader": "^4.3.0",
@@ -68,5 +45,10 @@
68
45
  "webpack": "^5.24.4",
69
46
  "webpack-cli": "^4.5.0",
70
47
  "webpack-log": "^3.0.1"
48
+ },
49
+ "allowScripts": {
50
+ "@cocreate/webpack@1.4.3": true,
51
+ "esbuild@0.25.12": true,
52
+ "esbuild@0.28.1": true
71
53
  }
72
54
  }
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ tabWidth: 4,
3
+ semi: true,
4
+ trailingComma: "none",
5
+ bracketSameLine: true,
6
+ useTabs: true,
7
+ overrides: [
8
+ {
9
+ files: ["*.json", "*.yml", "*.yaml"],
10
+ options: {
11
+ tabWidth: 2,
12
+ useTabs: false
13
+ },
14
+ }
15
+ ],
16
+ };
@@ -0,0 +1,30 @@
1
+ export default {
2
+ dryRun: false,
3
+ branches: ["master"],
4
+ plugins: [
5
+ "@semantic-release/commit-analyzer",
6
+ "@semantic-release/release-notes-generator",
7
+ [
8
+ "@semantic-release/changelog",
9
+ {
10
+ changelogFile: "CHANGELOG.md",
11
+ },
12
+ ],
13
+ "@semantic-release/npm",
14
+ [
15
+ "@semantic-release/github",
16
+ {
17
+ successComment: false,
18
+ failTitle: false,
19
+ },
20
+ ],
21
+ [
22
+ "@semantic-release/git",
23
+ {
24
+ // Only stage and commit the changelog and package.json
25
+ assets: ["CHANGELOG.md", "package.json"],
26
+ message: "chore(release): ${nextRelease.version} [skip ci]",
27
+ },
28
+ ],
29
+ ],
30
+ };
package/src/dataQuery.js CHANGED
@@ -192,6 +192,7 @@ function queryMatch(data, query) {
192
192
  }
193
193
 
194
194
  export function queryData(data, query) {
195
+ if (!query) return true
195
196
  if (query.$and) {
196
197
  for (let i = 0; i < query.$and.length; i++) {
197
198
  if (!queryData(data, query.$and[i])) return false;
package/src/index.js CHANGED
@@ -1,70 +1,90 @@
1
- export { getRelativePath } from "./getRelativePath.js";
2
- export { ObjectId } from "./ObjectId.js";
3
- export { uid } from "./uid.js";
4
- export { checkValue } from "./checkValue.js";
5
- export { isValidDate } from "./isValidDate.js";
6
- export { objectToSearchParams } from "./objectToSearchParams.js";
7
- export { dotNotationToObject } from "./dotNotationToObject.js";
8
- export { objectToDotNotation } from "./objectToDotNotation.js";
9
- export { getValueFromObject } from "./getValueFromObject.js";
10
- export { createUpdate } from "./createUpdate.js";
11
- export { domParser } from "./domParser.js";
12
- export { parseTextToHtml } from "./parseTextToHtml.js";
13
- export { escapeHtml } from "./escapeHtml.js";
14
- export { cssPath } from "./cssPath.js";
15
- export { queryElements, checkMediaQueries } from "./queryElements.js";
16
- export { queryData, searchData, sortData } from "./dataQuery.js";
17
- export { getAttributes, getAttributeNames, setAttributeNames } from "./attributes.js";
18
- // export { safeParse } from "./safeParse.js";
19
- export { clickedElement } from "./clickedElement.js";
20
- export { processOperators, processOperatorsAsync } from "./operators.js";
21
-
22
- import { getRelativePath } from "./getRelativePath.js";
23
- import { ObjectId } from "./ObjectId.js";
24
- import { uid } from "./uid.js";
25
- import { checkValue } from "./checkValue.js";
26
- import { isValidDate } from "./isValidDate.js";
27
- import { objectToSearchParams } from "./objectToSearchParams.js";
28
- import { dotNotationToObject } from "./dotNotationToObject.js";
29
- import { objectToDotNotation } from "./objectToDotNotation.js";
30
- import { getValueFromObject } from "./getValueFromObject.js";
31
- import { createUpdate } from "./createUpdate.js";
32
- import { domParser } from "./domParser.js";
33
- import { parseTextToHtml } from "./parseTextToHtml.js";
34
- import { escapeHtml } from "./escapeHtml.js";
35
- import { cssPath } from "./cssPath.js";
36
- import { queryElements, checkMediaQueries } from "./queryElements.js";
37
- import { queryData, searchData, sortData } from "./dataQuery.js";
38
- import { getAttributes, getAttributeNames, setAttributeNames } from "./attributes.js";
39
- // import { safeParse } from "./safeParse.js";
40
- import { processOperators, processOperatorsAsync } from "./operators.js";
41
-
42
- const utils = {
43
- getRelativePath,
44
- ObjectId,
45
- uid,
46
- checkValue,
47
- isValidDate,
48
- dotNotationToObject,
49
- objectToDotNotation,
50
- getValueFromObject,
51
- objectToSearchParams,
52
- domParser,
53
- parseTextToHtml,
54
- escapeHtml,
55
- cssPath,
56
- queryElements,
57
- checkMediaQueries,
58
- queryData,
59
- searchData,
60
- sortData,
61
- createUpdate,
62
- getAttributes,
63
- setAttributeNames,
64
- getAttributeNames,
65
- // safeParse,
66
- processOperators,
67
- processOperatorsAsync
68
- };
69
-
70
- export default utils;
1
+ /********************************************************************************
2
+ * Copyright (C) 2026 CoCreate and Contributors.
3
+ *
4
+ * This program is free software: you can redistribute it and/or modify
5
+ * it under the terms of the GNU Affero General Public License as published
6
+ * by the Free Software Foundation, either version 3 of the License, or
7
+ * (at your option) any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ *
17
+ ********************************************************************************/
18
+
19
+ export { getRelativePath } from "./getRelativePath.js";
20
+ export { ObjectId } from "./ObjectId.js";
21
+ export { uid } from "./uid.js";
22
+ export { checkValue } from "./checkValue.js";
23
+ export { isValidDate } from "./isValidDate.js";
24
+ export { objectToSearchParams } from "./objectToSearchParams.js";
25
+ export { dotNotationToObject } from "./dotNotationToObject.js";
26
+ export { objectToDotNotation } from "./objectToDotNotation.js";
27
+ export { getValueFromObject } from "./getValueFromObject.js";
28
+ export { createUpdate } from "./createUpdate.js";
29
+ export { domParser } from "./domParser.js";
30
+ export { parseTextToHtml } from "./parseTextToHtml.js";
31
+ export { escapeHtml } from "./escapeHtml.js";
32
+ export { cssPath } from "./cssPath.js";
33
+ export { queryElements, checkMediaQueries } from "./queryElements.js";
34
+ export { queryData, searchData, sortData } from "./dataQuery.js";
35
+ export { getAttributes, getAttributeNames, setAttributeNames } from "./attributes.js";
36
+ export { clickedElement } from "./clickedElement.js";
37
+ export { processOperators, processOperatorsAsync, customOperators, safeParse } from "./operators.js";
38
+
39
+ import { getRelativePath } from "./getRelativePath.js";
40
+ import { ObjectId } from "./ObjectId.js";
41
+ import { uid } from "./uid.js";
42
+ import { checkValue } from "./checkValue.js";
43
+ import { isValidDate } from "./isValidDate.js";
44
+ import { objectToSearchParams } from "./objectToSearchParams.js";
45
+ import { dotNotationToObject } from "./dotNotationToObject.js";
46
+ import { objectToDotNotation } from "./objectToDotNotation.js";
47
+ import { getValueFromObject } from "./getValueFromObject.js";
48
+ import { createUpdate } from "./createUpdate.js";
49
+ import { domParser } from "./domParser.js";
50
+ import { parseTextToHtml } from "./parseTextToHtml.js";
51
+ import { escapeHtml } from "./escapeHtml.js";
52
+ import { cssPath } from "./cssPath.js";
53
+ import { queryElements, checkMediaQueries } from "./queryElements.js";
54
+ import { queryData, searchData, sortData } from "./dataQuery.js";
55
+ import { getAttributes, getAttributeNames, setAttributeNames } from "./attributes.js";
56
+ import { clickedElement } from "./clickedElement.js";
57
+ import { processOperators, processOperatorsAsync, customOperators, safeParse } from "./operators.js";
58
+
59
+ const utils = {
60
+ getRelativePath,
61
+ ObjectId,
62
+ uid,
63
+ checkValue,
64
+ isValidDate,
65
+ dotNotationToObject,
66
+ objectToDotNotation,
67
+ getValueFromObject,
68
+ objectToSearchParams,
69
+ domParser,
70
+ parseTextToHtml,
71
+ escapeHtml,
72
+ cssPath,
73
+ queryElements,
74
+ checkMediaQueries,
75
+ queryData,
76
+ searchData,
77
+ sortData,
78
+ createUpdate,
79
+ getAttributes,
80
+ setAttributeNames,
81
+ getAttributeNames,
82
+ clickedElement,
83
+ processOperators,
84
+ processOperatorsAsync,
85
+ customOperators,
86
+ safeParse
87
+
88
+ };
89
+
90
+ export default utils;