mirror of
https://github.com/jaandrle/deka-dom-el
synced 2025-04-03 04:25:53 +02:00
⚡ issignal
This commit is contained in:
parent
6c297672c1
commit
da4e3e52d9
9
dist/dde-with-signals.js
vendored
9
dist/dde-with-signals.js
vendored
@ -177,11 +177,6 @@ var scope = {
|
|||||||
pop() {
|
pop() {
|
||||||
if (scopes.length === 1) return;
|
if (scopes.length === 1) return;
|
||||||
return scopes.pop();
|
return scopes.pop();
|
||||||
},
|
|
||||||
isolate(fn) {
|
|
||||||
this.push({ prevent: true });
|
|
||||||
fn();
|
|
||||||
this.pop();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function append(...els) {
|
function append(...els) {
|
||||||
@ -647,7 +642,7 @@ on.disconnectedAsAbort = function(host) {
|
|||||||
const a = new AbortController();
|
const a = new AbortController();
|
||||||
store_abort.set(host, a);
|
store_abort.set(host, a);
|
||||||
host(on.disconnected(() => a.abort()));
|
host(on.disconnected(() => a.abort()));
|
||||||
return a;
|
return a.signal;
|
||||||
};
|
};
|
||||||
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
||||||
on.attributeChanged = function(listener, options) {
|
on.attributeChanged = function(listener, options) {
|
||||||
@ -713,7 +708,7 @@ var SignalReadOnly = oCreate(Signal, {
|
|||||||
} }
|
} }
|
||||||
});
|
});
|
||||||
function isSignal(candidate) {
|
function isSignal(candidate) {
|
||||||
return isProtoFrom(candidate, Signal);
|
return candidate && candidate[mark];
|
||||||
}
|
}
|
||||||
var stack_watch = [];
|
var stack_watch = [];
|
||||||
var deps = /* @__PURE__ */ new WeakMap();
|
var deps = /* @__PURE__ */ new WeakMap();
|
||||||
|
14
dist/dde-with-signals.min.js
vendored
14
dist/dde-with-signals.min.js
vendored
File diff suppressed because one or more lines are too long
7
dist/dde.js
vendored
7
dist/dde.js
vendored
@ -154,11 +154,6 @@ var scope = {
|
|||||||
pop() {
|
pop() {
|
||||||
if (scopes.length === 1) return;
|
if (scopes.length === 1) return;
|
||||||
return scopes.pop();
|
return scopes.pop();
|
||||||
},
|
|
||||||
isolate(fn) {
|
|
||||||
this.push({ prevent: true });
|
|
||||||
fn();
|
|
||||||
this.pop();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function append(...els) {
|
function append(...els) {
|
||||||
@ -624,7 +619,7 @@ on.disconnectedAsAbort = function(host) {
|
|||||||
const a = new AbortController();
|
const a = new AbortController();
|
||||||
store_abort.set(host, a);
|
store_abort.set(host, a);
|
||||||
host(on.disconnected(() => a.abort()));
|
host(on.disconnected(() => a.abort()));
|
||||||
return a;
|
return a.signal;
|
||||||
};
|
};
|
||||||
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
||||||
on.attributeChanged = function(listener, options) {
|
on.attributeChanged = function(listener, options) {
|
||||||
|
8
dist/dde.min.js
vendored
8
dist/dde.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/esm-with-signals.d.min.ts
vendored
6
dist/esm-with-signals.d.min.ts
vendored
@ -76,7 +76,7 @@ export function el<
|
|||||||
A extends ddeComponentAttributes,
|
A extends ddeComponentAttributes,
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>,
|
attrs?: NoInfer<A>,
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -86,7 +86,7 @@ export function el<
|
|||||||
A extends { textContent: ddeStringable },
|
A extends { textContent: ddeStringable },
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>["textContent"],
|
attrs?: NoInfer<A>["textContent"],
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -237,8 +237,6 @@ export const scope: {
|
|||||||
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
||||||
/** Removes last/current child scope. */
|
/** Removes last/current child scope. */
|
||||||
pop(): ReturnType<Array<Scope>["pop"]>,
|
pop(): ReturnType<Array<Scope>["pop"]>,
|
||||||
/** Runs function in a new (isolated) scope */
|
|
||||||
isolate(fn: Function): void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function customElementRender<
|
export function customElementRender<
|
||||||
|
6
dist/esm-with-signals.d.ts
vendored
6
dist/esm-with-signals.d.ts
vendored
@ -76,7 +76,7 @@ export function el<
|
|||||||
A extends ddeComponentAttributes,
|
A extends ddeComponentAttributes,
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>,
|
attrs?: NoInfer<A>,
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -86,7 +86,7 @@ export function el<
|
|||||||
A extends { textContent: ddeStringable },
|
A extends { textContent: ddeStringable },
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>["textContent"],
|
attrs?: NoInfer<A>["textContent"],
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -237,8 +237,6 @@ export const scope: {
|
|||||||
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
||||||
/** Removes last/current child scope. */
|
/** Removes last/current child scope. */
|
||||||
pop(): ReturnType<Array<Scope>["pop"]>,
|
pop(): ReturnType<Array<Scope>["pop"]>,
|
||||||
/** Runs function in a new (isolated) scope */
|
|
||||||
isolate(fn: Function): void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function customElementRender<
|
export function customElementRender<
|
||||||
|
9
dist/esm-with-signals.js
vendored
9
dist/esm-with-signals.js
vendored
@ -175,11 +175,6 @@ var scope = {
|
|||||||
pop() {
|
pop() {
|
||||||
if (scopes.length === 1) return;
|
if (scopes.length === 1) return;
|
||||||
return scopes.pop();
|
return scopes.pop();
|
||||||
},
|
|
||||||
isolate(fn) {
|
|
||||||
this.push({ prevent: true });
|
|
||||||
fn();
|
|
||||||
this.pop();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function append(...els) {
|
function append(...els) {
|
||||||
@ -645,7 +640,7 @@ on.disconnectedAsAbort = function(host) {
|
|||||||
const a = new AbortController();
|
const a = new AbortController();
|
||||||
store_abort.set(host, a);
|
store_abort.set(host, a);
|
||||||
host(on.disconnected(() => a.abort()));
|
host(on.disconnected(() => a.abort()));
|
||||||
return a;
|
return a.signal;
|
||||||
};
|
};
|
||||||
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
||||||
on.attributeChanged = function(listener, options) {
|
on.attributeChanged = function(listener, options) {
|
||||||
@ -711,7 +706,7 @@ var SignalReadOnly = oCreate(Signal, {
|
|||||||
} }
|
} }
|
||||||
});
|
});
|
||||||
function isSignal(candidate) {
|
function isSignal(candidate) {
|
||||||
return isProtoFrom(candidate, Signal);
|
return candidate && candidate[mark];
|
||||||
}
|
}
|
||||||
var stack_watch = [];
|
var stack_watch = [];
|
||||||
var deps = /* @__PURE__ */ new WeakMap();
|
var deps = /* @__PURE__ */ new WeakMap();
|
||||||
|
8
dist/esm-with-signals.min.js
vendored
8
dist/esm-with-signals.min.js
vendored
File diff suppressed because one or more lines are too long
6
dist/esm.d.min.ts
vendored
6
dist/esm.d.min.ts
vendored
@ -76,7 +76,7 @@ export function el<
|
|||||||
A extends ddeComponentAttributes,
|
A extends ddeComponentAttributes,
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>,
|
attrs?: NoInfer<A>,
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -86,7 +86,7 @@ export function el<
|
|||||||
A extends { textContent: ddeStringable },
|
A extends { textContent: ddeStringable },
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>["textContent"],
|
attrs?: NoInfer<A>["textContent"],
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -237,8 +237,6 @@ export const scope: {
|
|||||||
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
||||||
/** Removes last/current child scope. */
|
/** Removes last/current child scope. */
|
||||||
pop(): ReturnType<Array<Scope>["pop"]>,
|
pop(): ReturnType<Array<Scope>["pop"]>,
|
||||||
/** Runs function in a new (isolated) scope */
|
|
||||||
isolate(fn: Function): void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function customElementRender<
|
export function customElementRender<
|
||||||
|
6
dist/esm.d.ts
vendored
6
dist/esm.d.ts
vendored
@ -76,7 +76,7 @@ export function el<
|
|||||||
A extends ddeComponentAttributes,
|
A extends ddeComponentAttributes,
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>,
|
attrs?: NoInfer<A>,
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -86,7 +86,7 @@ export function el<
|
|||||||
A extends { textContent: ddeStringable },
|
A extends { textContent: ddeStringable },
|
||||||
EL extends SupportedElement | ddeDocumentFragment
|
EL extends SupportedElement | ddeDocumentFragment
|
||||||
>(
|
>(
|
||||||
component: (attr: A)=> EL,
|
component: (attr: A, ...rest: any[])=> EL,
|
||||||
attrs?: NoInfer<A>["textContent"],
|
attrs?: NoInfer<A>["textContent"],
|
||||||
...addons: ddeElementAddon<EL>[]
|
...addons: ddeElementAddon<EL>[]
|
||||||
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
): EL extends ddeHTMLElementTagNameMap[keyof ddeHTMLElementTagNameMap]
|
||||||
@ -237,8 +237,6 @@ export const scope: {
|
|||||||
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
pushRoot(): ReturnType<Array<Scope>["push"]>,
|
||||||
/** Removes last/current child scope. */
|
/** Removes last/current child scope. */
|
||||||
pop(): ReturnType<Array<Scope>["pop"]>,
|
pop(): ReturnType<Array<Scope>["pop"]>,
|
||||||
/** Runs function in a new (isolated) scope */
|
|
||||||
isolate(fn: Function): void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function customElementRender<
|
export function customElementRender<
|
||||||
|
7
dist/esm.js
vendored
7
dist/esm.js
vendored
@ -152,11 +152,6 @@ var scope = {
|
|||||||
pop() {
|
pop() {
|
||||||
if (scopes.length === 1) return;
|
if (scopes.length === 1) return;
|
||||||
return scopes.pop();
|
return scopes.pop();
|
||||||
},
|
|
||||||
isolate(fn) {
|
|
||||||
this.push({ prevent: true });
|
|
||||||
fn();
|
|
||||||
this.pop();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function append(...els) {
|
function append(...els) {
|
||||||
@ -622,7 +617,7 @@ on.disconnectedAsAbort = function(host) {
|
|||||||
const a = new AbortController();
|
const a = new AbortController();
|
||||||
store_abort.set(host, a);
|
store_abort.set(host, a);
|
||||||
host(on.disconnected(() => a.abort()));
|
host(on.disconnected(() => a.abort()));
|
||||||
return a;
|
return a.signal;
|
||||||
};
|
};
|
||||||
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
var els_attribute_store = /* @__PURE__ */ new WeakSet();
|
||||||
on.attributeChanged = function(listener, options) {
|
on.attributeChanged = function(listener, options) {
|
||||||
|
2
dist/esm.min.js
vendored
2
dist/esm.min.js
vendored
File diff suppressed because one or more lines are too long
26
nohup.out
26
nohup.out
@ -1,26 +0,0 @@
|
|||||||
Markserv boot: starting Markserv...
|
|
||||||
(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/implant/package.json' of 'implant'. Please either fix that or report it to the module author
|
|
||||||
(Use `node --trace-deprecation ...` to show where the warning was created)
|
|
||||||
(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/balanced-pairs/package.json' of 'balanced-pairs'. Please either fix that or report it to the module author
|
|
||||||
(node:170089) [DEP0128] DeprecationWarning: Invalid 'main' field in '/home/jaandrle/.npm/_npx/13a70f167aa91a98/node_modules/super-split/package.json' of 'super-split'. Please either fix that or report it to the module author
|
|
||||||
Markserv address: http://localhost:8642
|
|
||||||
Markserv path: /home/jaandrle/Vzdálené/GitHub/deka-dom-el
|
|
||||||
Markserv livereload: communicating on port: 35729
|
|
||||||
Markserv process: your pid is: 170089
|
|
||||||
Markserv stop: press [Ctrl + C] or type "sudo kill -9 170089"
|
|
||||||
GitHub Contribute on Github - github.com/markserv
|
|
||||||
Markserv upgrade: checking for upgrade...
|
|
||||||
Markserv upgrade: no upgrade available
|
|
||||||
Markserv dir: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
||||||
Markserv markdown: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/README.md
|
|
||||||
Markserv file: /home/jaandrle/Vzdálené/GitHub/deka-dom-el/docs/assets/logo.svg
|
|
@ -1,6 +1,6 @@
|
|||||||
import { queueSignalWrite, mark } from "./helpers.js";
|
import { queueSignalWrite, mark } from "./helpers.js";
|
||||||
export { mark };
|
export { mark };
|
||||||
import { hasOwn, Defined, oCreate, isProtoFrom, oAssign } from "../helpers.js";
|
import { hasOwn, Defined, oCreate, oAssign } from "../helpers.js";
|
||||||
|
|
||||||
const Signal = oCreate(null, {
|
const Signal = oCreate(null, {
|
||||||
get: { value(){ return read(this); } },
|
get: { value(){ return read(this); } },
|
||||||
@ -18,7 +18,7 @@ const SignalReadOnly= oCreate(Signal, {
|
|||||||
* @returns {boolean} True if the value is a signal
|
* @returns {boolean} True if the value is a signal
|
||||||
*/
|
*/
|
||||||
export function isSignal(candidate){
|
export function isSignal(candidate){
|
||||||
return isProtoFrom(candidate, Signal);
|
return candidate && candidate[mark];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user