Bump @justinribeiro/lite-youtube from 0.9.0 to 0.9.1 in /build/javascript (#273)
* Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript (#265) * Trying a new github workflow to install javascript packages * Bump tailwindcss from 1.9.2 to 1.9.4 in /build/javascript (#266) Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from 1.9.2 to 1.9.4. - [Release notes](https://github.com/tailwindlabs/tailwindcss/releases) - [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/master/CHANGELOG.md) - [Commits](https://github.com/tailwindlabs/tailwindcss/compare/v1.9.2...v1.9.4) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Commit updated Javascript packages * Bump preact from 10.5.4 to 10.5.5 in /build/javascript Bumps [preact](https://github.com/preactjs/preact) from 10.5.4 to 10.5.5. - [Release notes](https://github.com/preactjs/preact/releases) - [Commits](https://github.com/preactjs/preact/compare/10.5.4...10.5.5) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Owncast <owncast@owncast.online> * Bump @justinribeiro/lite-youtube in /build/javascript Bumps [@justinribeiro/lite-youtube](https://github.com/justinribeiro/lite-youtube) from 0.9.0 to 0.9.1. - [Release notes](https://github.com/justinribeiro/lite-youtube/releases) - [Commits](https://github.com/justinribeiro/lite-youtube/commits) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Owncast <owncast@owncast.online> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
This commit is contained in:
66
build/javascript/node_modules/preact/src/create-context.js
generated
vendored
Normal file
66
build/javascript/node_modules/preact/src/create-context.js
generated
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
import { enqueueRender } from './component';
|
||||
|
||||
export let i = 0;
|
||||
|
||||
export function createContext(defaultValue, contextId) {
|
||||
contextId = '__cC' + i++;
|
||||
|
||||
const context = {
|
||||
_id: contextId,
|
||||
_defaultValue: defaultValue,
|
||||
Consumer(props, contextValue) {
|
||||
// return props.children(
|
||||
// context[contextId] ? context[contextId].props.value : defaultValue
|
||||
// );
|
||||
return props.children(contextValue);
|
||||
},
|
||||
Provider(props, subs, ctx) {
|
||||
if (!this.getChildContext) {
|
||||
subs = [];
|
||||
ctx = {};
|
||||
ctx[contextId] = this;
|
||||
|
||||
this.getChildContext = () => ctx;
|
||||
|
||||
this.shouldComponentUpdate = function(_props) {
|
||||
if (this.props.value !== _props.value) {
|
||||
// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:
|
||||
// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358
|
||||
// In those cases though, even with the value corrected, we're double-rendering all nodes.
|
||||
// It might be better to just tell folks not to use force-sync mode.
|
||||
// Currently, using `useContext()` in a class component will overwrite its `this.context` value.
|
||||
// subs.some(c => {
|
||||
// c.context = _props.value;
|
||||
// enqueueRender(c);
|
||||
// });
|
||||
|
||||
// subs.some(c => {
|
||||
// c.context[contextId] = _props.value;
|
||||
// enqueueRender(c);
|
||||
// });
|
||||
subs.some(enqueueRender);
|
||||
}
|
||||
};
|
||||
|
||||
this.sub = c => {
|
||||
subs.push(c);
|
||||
let old = c.componentWillUnmount;
|
||||
c.componentWillUnmount = () => {
|
||||
subs.splice(subs.indexOf(c), 1);
|
||||
if (old) old.call(c);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
return props.children;
|
||||
}
|
||||
};
|
||||
|
||||
// Devtools needs access to the context object when it
|
||||
// encounters a Provider. This is necessary to support
|
||||
// setting `displayName` on the context object instead
|
||||
// of on the component itself. See:
|
||||
// https://reactjs.org/docs/context.html#contextdisplayname
|
||||
|
||||
return (context.Provider._contextRef = context.Consumer.contextType = context);
|
||||
}
|
||||
Reference in New Issue
Block a user