Last commit july 5th

This commit is contained in:
2024-07-05 13:46:23 +02:00
parent dad0d86e8c
commit b0e4dfbb76
24982 changed files with 2621219 additions and 413 deletions

16
spa/node_modules/preact-router/match/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
import * as preact from 'preact';
import { Link as StaticLink, RoutableProps } from '..';
export class Match extends preact.Component<RoutableProps, {}> {
render(): preact.VNode;
}
export interface LinkProps extends preact.JSX.HTMLAttributes<HTMLAnchorElement> {
activeClassName?: string;
children?: preact.ComponentChildren;
}
export function Link(props: LinkProps): preact.VNode;
export default Match;

1
spa/node_modules/preact-router/match/index.js generated vendored Normal file
View File

@@ -0,0 +1 @@
var e=require("preact"),a=require("preact-router"),r=["className","activeClass","activeClassName","path"];function t(e){var r=a.useRouter()[0];return e.children({url:r.url,path:r.path,matches:!1!==a.exec(r.path||r.url,e.path,{})})}t.Link=function(t){var s=t.className,u=t.activeClass,c=t.activeClassName,l=t.path,n=function(e,a){if(null==e)return{};var r,t,s={},u=Object.keys(e);for(t=0;t<u.length;t++)a.indexOf(r=u[t])>=0||(s[r]=e[r]);return s}(t,r),i=a.useRouter()[0],h=l&&i.path&&a.exec(i.path,l,{})||a.exec(i.url,n.href,{}),p=n.class||s||"",o=h&&(u||c)||"";return n.class=p+(p&&o&&" ")+o,e.h(a.Link,n)},module.exports=t;

1
spa/node_modules/preact-router/match/index.mjs generated vendored Normal file
View File

@@ -0,0 +1 @@
import{h as a}from"preact";import{useRouter as t,exec as r,Link as e}from"preact-router";var s=["className","activeClass","activeClassName","path"];function l(a){var e=t()[0];return a.children({url:e.url,path:e.path,matches:!1!==r(e.path||e.url,a.path,{})})}function c(l){var c=l.className,n=l.activeClass,u=l.activeClassName,i=l.path,p=function(a,t){if(null==a)return{};var r,e,s={},l=Object.keys(a);for(e=0;e<l.length;e++)t.indexOf(r=l[e])>=0||(s[r]=a[r]);return s}(l,s),h=t()[0],f=i&&h.path&&r(h.path,i,{})||r(h.url,p.href,{}),o=p.class||c||"",m=f&&(n||u)||"";return p.class=o+(o&&m&&" ")+m,a(e,p)}export{c as Link,l as Match,l as default};

1
spa/node_modules/preact-router/match/index.module.js generated vendored Normal file
View File

@@ -0,0 +1 @@
import{h as a}from"preact";import{useRouter as t,exec as r,Link as e}from"preact-router";var s=["className","activeClass","activeClassName","path"];function l(a){var e=t()[0];return a.children({url:e.url,path:e.path,matches:!1!==r(e.path||e.url,a.path,{})})}function c(l){var c=l.className,n=l.activeClass,u=l.activeClassName,i=l.path,p=function(a,t){if(null==a)return{};var r,e,s={},l=Object.keys(a);for(e=0;e<l.length;e++)t.indexOf(r=l[e])>=0||(s[r]=a[r]);return s}(l,s),h=t()[0],f=i&&h.path&&r(h.path,i,{})||r(h.url,p.href,{}),o=p.class||c||"",m=f&&(n||u)||"";return p.class=o+(o&&m&&" ")+m,a(e,p)}export{c as Link,l as Match,l as default};

13
spa/node_modules/preact-router/match/package.json generated vendored Normal file
View File

@@ -0,0 +1,13 @@
{
"name": "index",
"main": "./index.js",
"module": "./index.module.js",
"types": "./index.d.ts",
"scripts": {
"build": "microbundle src/index.js -f es -o . --no-sourcemap --no-generateTypes && microbundle src/cjs.js -f cjs -o . --no-sourcemap --no-generateTypes"
},
"peerDependencies": {
"preact": "*",
"preact-router": "*"
}
}

4
spa/node_modules/preact-router/match/src/cjs.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
import { Match, Link } from './index';
Match.Link = Link;
export default Match;

32
spa/node_modules/preact-router/match/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,32 @@
import { h } from 'preact';
import { Link as StaticLink, exec, useRouter } from 'preact-router';
export function Match(props) {
const router = useRouter()[0];
return props.children({
url: router.url,
path: router.path,
matches: exec(router.path || router.url, props.path, {}) !== false
});
}
export function Link({
className,
activeClass,
activeClassName,
path,
...props
}) {
const router = useRouter()[0];
const matches =
(path && router.path && exec(router.path, path, {})) ||
exec(router.url, props.href, {});
let inactive = props.class || className || '';
let active = (matches && (activeClass || activeClassName)) || '';
props.class = inactive + (inactive && active && ' ') + active;
return <StaticLink {...props} />;
}
export default Match;