@design.estate/dees-domtools 2.0.60 → 2.0.62
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_bundle/bundle.js +81 -27
- package/dist_bundle/bundle.js.map +4 -4
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/domtools.pluginexports.d.ts +1 -1
- package/dist_ts/domtools.pluginexports.js +2 -2
- package/package.json +4 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/domtools.pluginexports.ts +1 -1
package/dist_bundle/bundle.js
CHANGED
|
@@ -32105,13 +32105,13 @@ var SmartMarkdown = class _SmartMarkdown {
|
|
|
32105
32105
|
}
|
|
32106
32106
|
};
|
|
32107
32107
|
|
|
32108
|
-
// node_modules/.pnpm/@push.rocks+smartrouter@1.
|
|
32108
|
+
// node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/index.js
|
|
32109
32109
|
var dist_ts_exports18 = {};
|
|
32110
32110
|
__export(dist_ts_exports18, {
|
|
32111
32111
|
SmartRouter: () => SmartRouter
|
|
32112
32112
|
});
|
|
32113
32113
|
|
|
32114
|
-
// node_modules/.pnpm/path-to-regexp@6.
|
|
32114
|
+
// node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist.es2015/index.js
|
|
32115
32115
|
var dist_exports = {};
|
|
32116
32116
|
__export(dist_exports, {
|
|
32117
32117
|
compile: () => compile,
|
|
@@ -32210,8 +32210,7 @@ function parse4(str, options) {
|
|
|
32210
32210
|
options = {};
|
|
32211
32211
|
}
|
|
32212
32212
|
var tokens = lexer(str);
|
|
32213
|
-
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a;
|
|
32214
|
-
var defaultPattern = "[^".concat(escapeString(options.delimiter || "/#?"), "]+?");
|
|
32213
|
+
var _a = options.prefixes, prefixes = _a === void 0 ? "./" : _a, _b = options.delimiter, delimiter = _b === void 0 ? "/#?" : _b;
|
|
32215
32214
|
var result = [];
|
|
32216
32215
|
var key2 = 0;
|
|
32217
32216
|
var i3 = 0;
|
|
@@ -32235,6 +32234,24 @@ function parse4(str, options) {
|
|
|
32235
32234
|
}
|
|
32236
32235
|
return result2;
|
|
32237
32236
|
};
|
|
32237
|
+
var isSafe = function(value3) {
|
|
32238
|
+
for (var _i = 0, delimiter_1 = delimiter; _i < delimiter_1.length; _i++) {
|
|
32239
|
+
var char2 = delimiter_1[_i];
|
|
32240
|
+
if (value3.indexOf(char2) > -1)
|
|
32241
|
+
return true;
|
|
32242
|
+
}
|
|
32243
|
+
return false;
|
|
32244
|
+
};
|
|
32245
|
+
var safePattern = function(prefix2) {
|
|
32246
|
+
var prev = result[result.length - 1];
|
|
32247
|
+
var prevText = prefix2 || (prev && typeof prev === "string" ? prev : "");
|
|
32248
|
+
if (prev && !prevText) {
|
|
32249
|
+
throw new TypeError('Must have text between two parameters, missing text after "'.concat(prev.name, '"'));
|
|
32250
|
+
}
|
|
32251
|
+
if (!prevText || isSafe(prevText))
|
|
32252
|
+
return "[^".concat(escapeString(delimiter), "]+?");
|
|
32253
|
+
return "(?:(?!".concat(escapeString(prevText), ")[^").concat(escapeString(delimiter), "])+?");
|
|
32254
|
+
};
|
|
32238
32255
|
while (i3 < tokens.length) {
|
|
32239
32256
|
var char = tryConsume("CHAR");
|
|
32240
32257
|
var name = tryConsume("NAME");
|
|
@@ -32253,7 +32270,7 @@ function parse4(str, options) {
|
|
|
32253
32270
|
name: name || key2++,
|
|
32254
32271
|
prefix,
|
|
32255
32272
|
suffix: "",
|
|
32256
|
-
pattern: pattern ||
|
|
32273
|
+
pattern: pattern || safePattern(prefix),
|
|
32257
32274
|
modifier: tryConsume("MODIFIER") || ""
|
|
32258
32275
|
});
|
|
32259
32276
|
continue;
|
|
@@ -32276,7 +32293,7 @@ function parse4(str, options) {
|
|
|
32276
32293
|
mustConsume("CLOSE");
|
|
32277
32294
|
result.push({
|
|
32278
32295
|
name: name_1 || (pattern_1 ? key2++ : ""),
|
|
32279
|
-
pattern: name_1 && !pattern_1 ?
|
|
32296
|
+
pattern: name_1 && !pattern_1 ? safePattern(prefix) : pattern_1,
|
|
32280
32297
|
prefix,
|
|
32281
32298
|
suffix,
|
|
32282
32299
|
modifier: tryConsume("MODIFIER") || ""
|
|
@@ -32447,10 +32464,9 @@ function tokensToRegexp(tokens, keys2, options) {
|
|
|
32447
32464
|
}
|
|
32448
32465
|
} else {
|
|
32449
32466
|
if (token.modifier === "+" || token.modifier === "*") {
|
|
32450
|
-
|
|
32451
|
-
} else {
|
|
32452
|
-
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
32467
|
+
throw new TypeError('Can not repeat "'.concat(token.name, '" without a prefix and suffix'));
|
|
32453
32468
|
}
|
|
32469
|
+
route += "(".concat(token.pattern, ")").concat(token.modifier);
|
|
32454
32470
|
}
|
|
32455
32471
|
} else {
|
|
32456
32472
|
route += "(?:".concat(prefix).concat(suffix, ")").concat(token.modifier);
|
|
@@ -32481,7 +32497,7 @@ function pathToRegexp(path3, keys2, options) {
|
|
|
32481
32497
|
return stringToRegexp(path3, keys2, options);
|
|
32482
32498
|
}
|
|
32483
32499
|
|
|
32484
|
-
// node_modules/.pnpm/@push.rocks+smartrouter@1.
|
|
32500
|
+
// node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.queryparams.js
|
|
32485
32501
|
var QueryParams = class {
|
|
32486
32502
|
constructor() {
|
|
32487
32503
|
}
|
|
@@ -32505,12 +32521,12 @@ var QueryParams = class {
|
|
|
32505
32521
|
}
|
|
32506
32522
|
};
|
|
32507
32523
|
|
|
32508
|
-
// node_modules/.pnpm/@push.rocks+smartrouter@1.
|
|
32509
|
-
var SmartRouter = class {
|
|
32524
|
+
// node_modules/.pnpm/@push.rocks+smartrouter@1.2.1/node_modules/@push.rocks/smartrouter/dist_ts/smartrouter.classes.smartrouter.js
|
|
32525
|
+
var SmartRouter = class _SmartRouter {
|
|
32510
32526
|
/**
|
|
32511
32527
|
* Creates an instance of Router.
|
|
32512
32528
|
*/
|
|
32513
|
-
constructor(optionsArg) {
|
|
32529
|
+
constructor(optionsArg, basePath = "") {
|
|
32514
32530
|
this.options = {
|
|
32515
32531
|
debug: false
|
|
32516
32532
|
};
|
|
@@ -32520,19 +32536,30 @@ var SmartRouter = class {
|
|
|
32520
32536
|
...this.options,
|
|
32521
32537
|
...optionsArg
|
|
32522
32538
|
};
|
|
32539
|
+
this.basePath = basePath;
|
|
32523
32540
|
window.addEventListener("popstate", (popStateEventArg) => {
|
|
32524
32541
|
popStateEventArg.preventDefault();
|
|
32525
32542
|
this._handleRouteState();
|
|
32526
32543
|
});
|
|
32527
32544
|
}
|
|
32545
|
+
/**
|
|
32546
|
+
* Create a sub-router with a specific prefix
|
|
32547
|
+
* @param {string} subPath
|
|
32548
|
+
* @param {IRouterOptions} [options]
|
|
32549
|
+
*/
|
|
32550
|
+
createSubRouter(subPath, options) {
|
|
32551
|
+
const newBasePath = `${this.basePath}${subPath}`;
|
|
32552
|
+
return new _SmartRouter({ ...this.options, ...options }, newBasePath);
|
|
32553
|
+
}
|
|
32528
32554
|
/**
|
|
32529
32555
|
* Push route state to history stack
|
|
32530
32556
|
*/
|
|
32531
32557
|
async pushUrl(url2 = "/", state = {}) {
|
|
32532
|
-
|
|
32533
|
-
|
|
32558
|
+
const fullUrl = `${this.basePath}${url2}`;
|
|
32559
|
+
if (fullUrl !== window.location.pathname) {
|
|
32560
|
+
window.history.pushState(state, window.document.title, fullUrl);
|
|
32534
32561
|
} else {
|
|
32535
|
-
window.history.replaceState(state, window.document.title,
|
|
32562
|
+
window.history.replaceState(state, window.document.title, fullUrl);
|
|
32536
32563
|
}
|
|
32537
32564
|
await this._handleRouteState();
|
|
32538
32565
|
}
|
|
@@ -32542,10 +32569,16 @@ var SmartRouter = class {
|
|
|
32542
32569
|
* @param {function} handlerArg
|
|
32543
32570
|
*/
|
|
32544
32571
|
on(routeArg, handlerArg) {
|
|
32545
|
-
this.
|
|
32546
|
-
|
|
32572
|
+
const fullRoute = `${this.basePath}${routeArg}`;
|
|
32573
|
+
const routeObject = {
|
|
32574
|
+
matchFunction: dist_exports.match(fullRoute),
|
|
32547
32575
|
handler: handlerArg
|
|
32548
|
-
}
|
|
32576
|
+
};
|
|
32577
|
+
this.routes.push(routeObject);
|
|
32578
|
+
const removeFunction = () => {
|
|
32579
|
+
this.routes.splice(this.routes.indexOf(routeObject), 1);
|
|
32580
|
+
};
|
|
32581
|
+
return removeFunction;
|
|
32549
32582
|
}
|
|
32550
32583
|
/**
|
|
32551
32584
|
* Apply routes handler to current route
|
|
@@ -32566,7 +32599,7 @@ var SmartRouter = class {
|
|
|
32566
32599
|
}
|
|
32567
32600
|
};
|
|
32568
32601
|
|
|
32569
|
-
// node_modules/.pnpm/@push.rocks+smartstate@2.0.
|
|
32602
|
+
// node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/index.js
|
|
32570
32603
|
var dist_ts_exports21 = {};
|
|
32571
32604
|
__export(dist_ts_exports21, {
|
|
32572
32605
|
Smartstate: () => Smartstate,
|
|
@@ -32736,7 +32769,7 @@ var sha256FromString = async (stringArg) => {
|
|
|
32736
32769
|
}
|
|
32737
32770
|
};
|
|
32738
32771
|
|
|
32739
|
-
// node_modules/.pnpm/@push.rocks+smartstate@2.0.
|
|
32772
|
+
// node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.stateaction.js
|
|
32740
32773
|
var StateAction = class {
|
|
32741
32774
|
constructor(statePartRef, actionDef) {
|
|
32742
32775
|
this.statePartRef = statePartRef;
|
|
@@ -32747,7 +32780,7 @@ var StateAction = class {
|
|
|
32747
32780
|
}
|
|
32748
32781
|
};
|
|
32749
32782
|
|
|
32750
|
-
// node_modules/.pnpm/@push.rocks+smartstate@2.0.
|
|
32783
|
+
// node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.statepart.js
|
|
32751
32784
|
var StatePart = class {
|
|
32752
32785
|
constructor(nameArg, webStoreOptionsArg) {
|
|
32753
32786
|
this.state = new dist_ts_exports4.rxjs.Subject();
|
|
@@ -32866,7 +32899,7 @@ var StatePart = class {
|
|
|
32866
32899
|
}
|
|
32867
32900
|
};
|
|
32868
32901
|
|
|
32869
|
-
// node_modules/.pnpm/@push.rocks+smartstate@2.0.
|
|
32902
|
+
// node_modules/.pnpm/@push.rocks+smartstate@2.0.19/node_modules/@push.rocks/smartstate/dist_ts/smartstate.classes.smartstate.js
|
|
32870
32903
|
var Smartstate = class {
|
|
32871
32904
|
constructor() {
|
|
32872
32905
|
this.statePartMap = {};
|
|
@@ -32914,14 +32947,15 @@ var Smartstate = class {
|
|
|
32914
32947
|
}
|
|
32915
32948
|
};
|
|
32916
32949
|
|
|
32917
|
-
// node_modules/.pnpm/@push.rocks+smarturl@3.0
|
|
32950
|
+
// node_modules/.pnpm/@push.rocks+smarturl@3.1.0/node_modules/@push.rocks/smarturl/dist_ts/index.js
|
|
32918
32951
|
var dist_ts_exports22 = {};
|
|
32919
32952
|
__export(dist_ts_exports22, {
|
|
32920
32953
|
Smarturl: () => Smarturl
|
|
32921
32954
|
});
|
|
32922
32955
|
|
|
32923
|
-
// node_modules/.pnpm/@push.rocks+smarturl@3.0
|
|
32956
|
+
// node_modules/.pnpm/@push.rocks+smarturl@3.1.0/node_modules/@push.rocks/smarturl/dist_ts/smarturl.classes.smarturl.js
|
|
32924
32957
|
var Smarturl = class _Smarturl {
|
|
32958
|
+
// Static method to create a Smarturl instance from a URL string
|
|
32925
32959
|
static createFromUrl(urlArg, optionsArg) {
|
|
32926
32960
|
const parsedUrlInstance = new URL(urlArg);
|
|
32927
32961
|
const searchParams = {};
|
|
@@ -32981,14 +33015,34 @@ var Smarturl = class _Smarturl {
|
|
|
32981
33015
|
Object.assign(returnSmarturl, parsedUrl);
|
|
32982
33016
|
return returnSmarturl;
|
|
32983
33017
|
}
|
|
33018
|
+
// Static method to create a Smarturl instance from an existing IUrlObject
|
|
32984
33019
|
static createFromParsedUrl(parsedUrlArg) {
|
|
32985
33020
|
const returnSmarturl = new _Smarturl();
|
|
32986
33021
|
Object.assign(returnSmarturl, parsedUrlArg);
|
|
32987
33022
|
return returnSmarturl;
|
|
32988
33023
|
}
|
|
33024
|
+
// Constructor initializes searchParams as an empty object
|
|
32989
33025
|
constructor() {
|
|
32990
33026
|
this.searchParams = {};
|
|
32991
33027
|
}
|
|
33028
|
+
// Method to create an independent clone of the current Smarturl instance
|
|
33029
|
+
clone() {
|
|
33030
|
+
const clonedInstance = new _Smarturl();
|
|
33031
|
+
Object.assign(clonedInstance, this);
|
|
33032
|
+
clonedInstance.searchParams = { ...this.searchParams };
|
|
33033
|
+
return clonedInstance;
|
|
33034
|
+
}
|
|
33035
|
+
/**
|
|
33036
|
+
* Typed method to set a property and return the instance for chaining.
|
|
33037
|
+
* @param prop - The property name to set (must be a key of Smarturl)
|
|
33038
|
+
* @param value - The value to assign to the property
|
|
33039
|
+
* @returns The Smarturl instance for method chaining
|
|
33040
|
+
*/
|
|
33041
|
+
set(prop, value2) {
|
|
33042
|
+
this[prop] = value2;
|
|
33043
|
+
return this;
|
|
33044
|
+
}
|
|
33045
|
+
// Method to convert the Smarturl instance back into a URL string
|
|
32992
33046
|
toString() {
|
|
32993
33047
|
let userpart = ``;
|
|
32994
33048
|
if (this.username && !this.password) {
|
|
@@ -34956,7 +35010,7 @@ var cssGridColumns = (amountOfColumnsArg, gapSizeArg) => {
|
|
|
34956
35010
|
// ts/domtools.pluginexports.ts
|
|
34957
35011
|
var domtools_pluginexports_exports = {};
|
|
34958
35012
|
__export(domtools_pluginexports_exports, {
|
|
34959
|
-
SweetScroll: () =>
|
|
35013
|
+
SweetScroll: () => import_sweet_scroll2.default,
|
|
34960
35014
|
smartdelay: () => dist_ts_exports2,
|
|
34961
35015
|
smartmarkdown: () => dist_ts_exports17,
|
|
34962
35016
|
smartpromise: () => dist_ts_exports,
|
|
@@ -34966,7 +35020,7 @@ __export(domtools_pluginexports_exports, {
|
|
|
34966
35020
|
smarturl: () => dist_ts_exports22,
|
|
34967
35021
|
typedrequest: () => dist_ts_exports15
|
|
34968
35022
|
});
|
|
34969
|
-
var
|
|
35023
|
+
var import_sweet_scroll2 = __toESM(require_sweet_scroll(), 1);
|
|
34970
35024
|
export {
|
|
34971
35025
|
DomTools2 as DomTools,
|
|
34972
35026
|
TypedRequest,
|