@domql/router 3.6.6 → 3.6.8
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/LICENSE +25 -12
- package/dist/cjs/index.js +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/iife/index.js +4 -3
- package/index.js +2 -1
- package/package.json +4 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
Creative Commons Attribution-NonCommercial 4.0 International License
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2023 symbo.ls
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
5
|
+
This work is licensed under the Creative Commons Attribution-NonCommercial
|
|
6
|
+
4.0 International License. To view a copy of this license, visit
|
|
7
|
+
https://creativecommons.org/licenses/by-nc/4.0/ or send a letter to
|
|
8
|
+
Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
copies or substantial portions of the Software.
|
|
10
|
+
You are free to:
|
|
14
11
|
|
|
15
|
-
|
|
12
|
+
Share — copy and redistribute the material in any medium or format
|
|
13
|
+
Adapt — remix, transform, and build upon the material
|
|
14
|
+
|
|
15
|
+
Under the following terms:
|
|
16
|
+
|
|
17
|
+
Attribution — You must give appropriate credit, provide a link to the
|
|
18
|
+
license, and indicate if changes were made. You may do so in any
|
|
19
|
+
reasonable manner, but not in any way that suggests the licensor endorses
|
|
20
|
+
you or your use.
|
|
21
|
+
|
|
22
|
+
NonCommercial — You may not use the material for commercial purposes.
|
|
23
|
+
|
|
24
|
+
No additional restrictions — You may not apply legal terms or
|
|
25
|
+
technological measures that legally restrict others from doing anything
|
|
26
|
+
the license permits.
|
|
27
|
+
|
|
28
|
+
THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
29
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
30
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
31
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
32
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE
|
|
21
|
-
|
|
33
|
+
OUT OF OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS IN THE
|
|
34
|
+
WORK.
|
package/dist/cjs/index.js
CHANGED
|
@@ -168,7 +168,8 @@ const router = (path, el, state = {}, options = {}) => {
|
|
|
168
168
|
ref.contentElementKey = opts.contentElementKey || "content";
|
|
169
169
|
}
|
|
170
170
|
const contentElementKey = (0, import_set.setContentKey)(element, opts);
|
|
171
|
-
const
|
|
171
|
+
const origin = win.location.origin !== "null" ? win.location.origin : "http://localhost";
|
|
172
|
+
const urlObj = new win.URL(origin + path);
|
|
172
173
|
const { pathname, search, hash } = urlObj;
|
|
173
174
|
const query = parseQuery(search);
|
|
174
175
|
const rootNode = element.node;
|
package/dist/esm/index.js
CHANGED
|
@@ -137,7 +137,8 @@ const router = (path, el, state = {}, options = {}) => {
|
|
|
137
137
|
ref.contentElementKey = opts.contentElementKey || "content";
|
|
138
138
|
}
|
|
139
139
|
const contentElementKey = setContentKey(element, opts);
|
|
140
|
-
const
|
|
140
|
+
const origin = win.location.origin !== "null" ? win.location.origin : "http://localhost";
|
|
141
|
+
const urlObj = new win.URL(origin + path);
|
|
141
142
|
const { pathname, search, hash } = urlObj;
|
|
142
143
|
const query = parseQuery(search);
|
|
143
144
|
const rootNode = element.node;
|
package/dist/iife/index.js
CHANGED
|
@@ -256,13 +256,13 @@ var DomqlRouter = (() => {
|
|
|
256
256
|
if (result && typeof result.then === "function") {
|
|
257
257
|
result.catch((err) => {
|
|
258
258
|
element.error = err;
|
|
259
|
-
console.error("[
|
|
259
|
+
console.error("[DOMQL] Async event error:", err);
|
|
260
260
|
});
|
|
261
261
|
}
|
|
262
262
|
return result;
|
|
263
263
|
} catch (err) {
|
|
264
264
|
element.error = err;
|
|
265
|
-
console.error("[
|
|
265
|
+
console.error("[DOMQL] Event handler error:", err);
|
|
266
266
|
if (element.context?.strictMode) throw err;
|
|
267
267
|
}
|
|
268
268
|
};
|
|
@@ -490,7 +490,8 @@ var DomqlRouter = (() => {
|
|
|
490
490
|
ref.contentElementKey = opts.contentElementKey || "content";
|
|
491
491
|
}
|
|
492
492
|
const contentElementKey = setContentKey(element, opts);
|
|
493
|
-
const
|
|
493
|
+
const origin = win.location.origin !== "null" ? win.location.origin : "http://localhost";
|
|
494
|
+
const urlObj = new win.URL(origin + path);
|
|
494
495
|
const { pathname, search, hash } = urlObj;
|
|
495
496
|
const query = parseQuery(search);
|
|
496
497
|
const rootNode = element.node;
|
package/index.js
CHANGED
|
@@ -180,7 +180,8 @@ export const router = (path, el, state = {}, options = {}) => {
|
|
|
180
180
|
|
|
181
181
|
const contentElementKey = setContentKey(element, opts)
|
|
182
182
|
|
|
183
|
-
const
|
|
183
|
+
const origin = win.location.origin !== 'null' ? win.location.origin : 'http://localhost'
|
|
184
|
+
const urlObj = new win.URL(origin + path)
|
|
184
185
|
const { pathname, search, hash } = urlObj
|
|
185
186
|
|
|
186
187
|
const query = parseQuery(search)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/router",
|
|
3
|
-
"version": "3.6.
|
|
4
|
-
"license": "
|
|
3
|
+
"version": "3.6.8",
|
|
4
|
+
"license": "CC-BY-NC-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
7
7
|
"unpkg": "./dist/iife/index.js",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"prepublish": "npm run build && npm run copy:package:cjs"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@domql/element": "^3.6.
|
|
31
|
-
"@domql/utils": "^3.6.
|
|
30
|
+
"@domql/element": "^3.6.8",
|
|
31
|
+
"@domql/utils": "^3.6.8"
|
|
32
32
|
},
|
|
33
33
|
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
|
|
34
34
|
"devDependencies": {
|