Skip to content

Commit

Permalink
build: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Masquerade-Circus committed Sep 12, 2022
1 parent f37a442 commit 716333c
Show file tree
Hide file tree
Showing 20 changed files with 927 additions and 1,061 deletions.
2 changes: 1 addition & 1 deletion dist/hooks/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 20 additions & 5 deletions dist/hooks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,15 @@ var localValyrian = {
vnode: null,
oldVnode: null
},
onUnmount: () => {
onUnmount() {
},
onCleanup: () => {
onCleanup() {
},
onMount: () => {
onMount() {
},
onUpdate: () => {
onUpdate() {
},
update() {
}
};
var createHook = function createHook2({ onCreate, onUpdate, onCleanup, onRemove, returnValue }) {
Expand Down Expand Up @@ -86,12 +88,25 @@ var createHook = function createHook2({ onCreate, onUpdate, onCleanup, onRemove,
return hook;
};
};
var updateTimeout;
function delayedUpdate() {
clearTimeout(updateTimeout);
updateTimeout = setTimeout(localValyrian.update);
}
var useState = createHook({
onCreate: (value) => {
let stateObj = /* @__PURE__ */ Object.create(null);
stateObj.value = value;
stateObj.toJSON = stateObj.toString = stateObj.valueOf = () => typeof stateObj.value === "function" ? stateObj.value() : stateObj.value;
return [stateObj, (value2) => stateObj.value = value2];
return [
stateObj,
(value2) => {
if (stateObj.value !== value2) {
stateObj.value = value2;
delayedUpdate();
}
}
];
}
});
var useEffect = createHook({
Expand Down
25 changes: 20 additions & 5 deletions dist/hooks/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ var localValyrian = {
vnode: null,
oldVnode: null
},
onUnmount: () => {
onUnmount() {
},
onCleanup: () => {
onCleanup() {
},
onMount: () => {
onMount() {
},
onUpdate: () => {
onUpdate() {
},
update() {
}
};
var createHook = function createHook2({ onCreate, onUpdate, onCleanup, onRemove, returnValue }) {
Expand Down Expand Up @@ -56,12 +58,25 @@ var createHook = function createHook2({ onCreate, onUpdate, onCleanup, onRemove,
return hook;
};
};
var updateTimeout;
function delayedUpdate() {
clearTimeout(updateTimeout);
updateTimeout = setTimeout(localValyrian.update);
}
var useState = createHook({
onCreate: (value) => {
let stateObj = /* @__PURE__ */ Object.create(null);
stateObj.value = value;
stateObj.toJSON = stateObj.toString = stateObj.valueOf = () => typeof stateObj.value === "function" ? stateObj.value() : stateObj.value;
return [stateObj, (value2) => stateObj.value = value2];
return [
stateObj,
(value2) => {
if (stateObj.value !== value2) {
stateObj.value = value2;
delayedUpdate();
}
}
];
}
});
var useEffect = createHook({
Expand Down
38 changes: 17 additions & 21 deletions dist/node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,36 +594,32 @@ async function icons(source, configuration) {
options.linksViewPath = options.linksViewPath.replace(/\/$/gi, "") + "/";
}
const { favicons } = await import("favicons");
return new Promise((resolve, reject) => {
favicons(source, options, (err, response) => {
if (err) {
process.stdout.write(err.status + "\n");
process.stdout.write(err.name + "\n");
process.stdout.write(err.message + "\n");
return reject(err);
try {
let response = await favicons(source, options);
if (options.iconsPath) {
for (let i in response.images) {
import_fs.default.writeFileSync(options.iconsPath + response.images[i].name, response.images[i].contents);
}
if (options.iconsPath) {
for (let i in response.images) {
import_fs.default.writeFileSync(options.iconsPath + response.images[i].name, response.images[i].contents);
}
for (let i in response.files) {
import_fs.default.writeFileSync(options.iconsPath + response.files[i].name, response.files[i].contents);
}
for (let i in response.files) {
import_fs.default.writeFileSync(options.iconsPath + response.files[i].name, response.files[i].contents);
}
if (options.linksViewPath) {
let html = `
}
if (options.linksViewPath) {
let html = `
function Links(){
return ${htmlToHyperscript(response.html.join(""))};
}
Links.default = Links;
module.exports = Links;
`;
import_fs.default.writeFileSync(`${options.linksViewPath}/links.js`, html);
}
resolve(void 0);
});
});
import_fs.default.writeFileSync(`${options.linksViewPath}/links.js`, html);
}
} catch (err) {
process.stdout.write(err.status + "\n");
process.stdout.write(err.name + "\n");
process.stdout.write(err.message + "\n");
}
}
icons.options = {
iconsPath: null,
Expand Down
38 changes: 17 additions & 21 deletions dist/node/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -554,36 +554,32 @@ async function icons(source, configuration) {
options.linksViewPath = options.linksViewPath.replace(/\/$/gi, "") + "/";
}
const { favicons } = await import("favicons");
return new Promise((resolve, reject) => {
favicons(source, options, (err, response) => {
if (err) {
process.stdout.write(err.status + "\n");
process.stdout.write(err.name + "\n");
process.stdout.write(err.message + "\n");
return reject(err);
try {
let response = await favicons(source, options);
if (options.iconsPath) {
for (let i in response.images) {
fs.writeFileSync(options.iconsPath + response.images[i].name, response.images[i].contents);
}
if (options.iconsPath) {
for (let i in response.images) {
fs.writeFileSync(options.iconsPath + response.images[i].name, response.images[i].contents);
}
for (let i in response.files) {
fs.writeFileSync(options.iconsPath + response.files[i].name, response.files[i].contents);
}
for (let i in response.files) {
fs.writeFileSync(options.iconsPath + response.files[i].name, response.files[i].contents);
}
if (options.linksViewPath) {
let html = `
}
if (options.linksViewPath) {
let html = `
function Links(){
return ${htmlToHyperscript(response.html.join(""))};
}
Links.default = Links;
module.exports = Links;
`;
fs.writeFileSync(`${options.linksViewPath}/links.js`, html);
}
resolve(void 0);
});
});
fs.writeFileSync(`${options.linksViewPath}/links.js`, html);
}
} catch (err) {
process.stdout.write(err.status + "\n");
process.stdout.write(err.name + "\n");
process.stdout.write(err.message + "\n");
}
}
icons.options = {
iconsPath: null,
Expand Down
2 changes: 1 addition & 1 deletion dist/node/utils/icons.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ interface IconsOptions {
yandex: boolean;
};
}
export declare function icons(source: string, configuration?: IconsOptions): Promise<unknown>;
export declare function icons(source: string, configuration?: IconsOptions): Promise<void>;
export declare namespace icons {
var options: IconsOptions;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/node/utils/icons.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/signal/index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions dist/signal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ function createSubscription(signal, subscriptions, handler) {
}
return subscriptions.get(handler);
}
var localValyrian = {
update: () => {
}
};
var updateTimeout;
function delayedUpdate() {
clearTimeout(updateTimeout);
updateTimeout = setTimeout(localValyrian.update);
}
function Signal(value) {
let subscriptions = /* @__PURE__ */ new Map();
let getters = {};
Expand Down Expand Up @@ -87,6 +96,7 @@ function Signal(value) {
let cleanup = handler(val);
makeUnsubscribe(subscriptions, computed, handler, cleanup);
}
delayedUpdate();
}
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/signal/index.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 716333c

Please sign in to comment.