// This is based on v0.11.0 of react-refresh // The following changes: // - Removed __DEV__ checks // - inlined REACT_MEMO_TYPE & REACT_FORWARD_REF_TYPE // - minified const F = "for" in Symbol ? Symbol.for("react.forward_ref") : 60112, C = "for" in Symbol ? Symbol.for("react.memo") : 60115, O = typeof WeakMap == "function" ? WeakMap : Map, T = new Map(), k = new O(), m = new O(), M = new O(); let g = []; const b = new Map(), w = new Map(), c = new Set(), p = new Set(), R = typeof WeakMap == "function" ? new WeakMap() : null; let S = !1; function _(e) { if (e.fullKey !== null) return e.fullKey; let t = e.ownKey, n; try { n = e.getCustomHooks(); } catch { return (e.forceReset = !0), (e.fullKey = t), t; } for (let o = 0; o < n.length; o++) { const l = n[o]; if (typeof l != "function") return (e.forceReset = !0), (e.fullKey = t), t; const s = m.get(l); if (s === void 0) continue; const r = _(s); s.forceReset && (e.forceReset = !0), (t += ` --- ` + r); } return (e.fullKey = t), t; } function D(e, t) { const n = m.get(e), o = m.get(t); return n === void 0 && o === void 0 ? !0 : !(n === void 0 || o === void 0 || _(n) !== _(o) || o.forceReset); } function B(e) { return e.prototype && e.prototype.isReactComponent; } function v(e, t) { return B(e) || B(t) ? !1 : !!D(e, t); } function I(e) { return M.get(e); } function P(e) { const t = new Map(); return ( e.forEach((n, o) => { t.set(o, n); }), t ); } function L(e) { const t = new Set(); return ( e.forEach((n) => { t.add(n); }), t ); } function H(e, t) { try { return e[t]; } catch { return; } } function j() { if (g.length === 0 || S) return null; S = !0; try { const e = new Set(), t = new Set(), n = g; (g = []), n.forEach((f) => { let [i, u] = f; const a = i.current; M.set(a, i), M.set(u, i), (i.current = u), v(a, u) ? t.add(i) : e.add(i); }); const o = { updatedFamilies: t, staleFamilies: e }; b.forEach((f) => { f.setRefreshHandler(I); }); let l = !1, s = null; const r = L(p), h = L(c), d = P(w); if ( (r.forEach((f) => { const i = d.get(f); if (i === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); if ((!p.has(f), R === null || !R.has(f))) return; const u = R.get(f); try { i.scheduleRoot(f, u); } catch (a) { l || ((l = !0), (s = a)); } }), h.forEach((f) => { const i = d.get(f); if (i === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); !c.has(f); try { i.scheduleRefresh(f, o); } catch (u) { l || ((l = !0), (s = u)); } }), l) ) throw s; return o; } finally { S = !1; } } function K(e, t) { if ( e === null || (typeof e != "function" && typeof e != "object") || k.has(e) ) return; let n = T.get(t); if ( (n === void 0 ? ((n = { current: e }), T.set(t, n)) : g.push([n, e]), k.set(e, n), typeof e == "object" && e !== null) ) switch (H(e, "$$typeof")) { case F: K(e.render, t + "$render"); break; case C: K(e.type, t + "$type"); break; } } function E(e, t) { let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, o = arguments.length > 3 ? arguments[3] : void 0; if ( (m.has(e) || m.set(e, { forceReset: n, ownKey: t, fullKey: null, getCustomHooks: o || (() => []), }), typeof e == "object" && e !== null) ) switch (H(e, "$$typeof")) { case F: E(e.render, t, n, o); break; case C: E(e.type, t, n, o); break; } } function A(e) { const t = m.get(e); t !== void 0 && _(t); } function $(e) { return T.get(e); } function W(e) { return k.get(e); } function x(e) { const t = new Set(); return ( c.forEach((n) => { const o = w.get(n); if (o === void 0) throw new Error( "Could not find helpers for a root. This is a bug in React Refresh.", ); o.findHostInstancesForRefresh(n, e).forEach((s) => { t.add(s); }); }), t ); } function z(e) { let t = e.__REACT_DEVTOOLS_GLOBAL_HOOK__; if (t === void 0) { let s = 0; e.__REACT_DEVTOOLS_GLOBAL_HOOK__ = t = { renderers: new Map(), supportsFiber: !0, inject(r) { return s++; }, onScheduleFiberRoot(r, h, d) {}, onCommitFiberRoot(r, h, d, f) {}, onCommitFiberUnmount() {}, }; } if (t.isDisabled) { console.warn( "Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). Fast Refresh is not compatible with this shim and will be disabled.", ); return; } const n = t.inject; (t.inject = function (s) { const r = n.apply(this, arguments); return ( typeof s.scheduleRefresh == "function" && typeof s.setRefreshHandler == "function" && b.set(r, s), r ); }), t.renderers.forEach((s, r) => { typeof s.scheduleRefresh == "function" && typeof s.setRefreshHandler == "function" && b.set(r, s); }); const o = t.onCommitFiberRoot, l = t.onScheduleFiberRoot || (() => {}); (t.onScheduleFiberRoot = function (s, r, h) { return ( S || (p.delete(r), R !== null && R.set(r, h)), l.apply(this, arguments) ); }), (t.onCommitFiberRoot = function (s, r, h, d) { const f = b.get(s); if (f !== void 0) { w.set(r, f); const i = r.current, u = i.alternate; if (u !== null) { const a = u.memoizedState != null && u.memoizedState.element != null && c.has(r), y = i.memoizedState != null && i.memoizedState.element != null; !a && y ? (c.add(r), p.delete(r)) : (a && y) || (a && !y ? (c.delete(r), d ? p.add(r) : w.delete(r)) : !a && !y && d && p.add(r)); } else c.add(r); } return o.apply(this, arguments); }); } function G() { return !1; } function N() { return c.size; } function U() { let e, t, n = !1; return function (o, l, s, r) { if (typeof l == "string") return ( e || ((e = o), (t = typeof r == "function")), o != null && (typeof o == "function" || typeof o == "object") && E(o, l, s, r), o ); !n && t && ((n = !0), A(e)); }; } function V(e) { switch (typeof e) { case "function": { if (e.prototype != null) { if (e.prototype.isReactComponent) return !0; const n = Object.getOwnPropertyNames(e.prototype); if ( n.length > 1 || n[0] !== "constructor" || e.prototype.__proto__ !== Object.prototype ) return !1; } const t = e.name || e.displayName; return typeof t == "string" && /^[A-Z]/.test(t); } case "object": { if (e != null) switch (H(e, "$$typeof")) { case F: case C: return !0; default: return !1; } return !1; } default: return !1; } } export { N as _getMountedRootCount, A as collectCustomHooksForSignature, U as createSignatureFunctionForTransform, x as findAffectedHostInstances, $ as getFamilyByID, W as getFamilyByType, G as hasUnrecoverableErrors, z as injectIntoGlobalHook, V as isLikelyComponentType, j as performReactRefresh, K as register, E as setSignature, }; /improve-custom-element-detection'>feat/improve-custom-element-detection Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/packages (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2022-06-30[ci] release (#3774)astro@1.0.0-beta.60@astrojs/vercel@0.2.4@astrojs/telemetry@0.2.3@astrojs/sitemap@0.2.4@astrojs/prefetch@0.0.3@astrojs/partytown@0.1.6@astrojs/node@0.1.3@astrojs/netlify@0.4.8@astrojs/mdx@0.0.2@astrojs/deno@0.1.8Gravatar Fred K. Bot 20-11/+79
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30Ci: improve times, reduce delay (#3780)Gravatar Fred K. Schott 1-14/+10
* improve CI times * improve CI times
2022-06-30await error reporter (#3779)Gravatar Fred K. Schott 2-10/+25
2022-06-30[ci] formatGravatar natemoo-re 14-99/+95
2022-06-30MDX support (#3706)Gravatar Nate Moore 63-57/+1153
* feat: first pass at MDX support * fix: move built-in JSX renderer to come first * chore: remove jsx example * chore: update lockfile * chore: cleanup example * fix: missing deps * refactor: move component render logic to `renderPage` * chore: update HMR script * chore: update MDX example * refactor: prefer unshit * refactor: remove TODO comment * fix: remove duplicate identifier * refactor: cleanup mdx entrypoint * fix: better html handling * fix: add tsconfig to mdx package * chore: update lockfile * fix: do not sort plugins unless mdx is enabled * chore: update compiler * fix(hmr): maybe render head for non-Astro pages * fix: set initial pageExtensions * refactor: cleanup addPageExtension * refactor: remove addPageExtensions from types * refactor: expose HookParameters type * fix: only default to astro for MDX * test: pick up jsx support in test fixtures * refactor: simplify mdx entrypoint * test: add basic MDX tests * test(e2e): add mdx + framework tests * chore: update lockfile * test(e2e): fix preact mdx e2e test * fix(mdx): disable .md support * test(e2e): fix vue-component test missing mdx * test(e2e): fix solid component needing import * fix: allow `client:only="solid"` as an alias to `solid-js` * chore: move to with-mdx example * chore: update MDX readme * chore: update example readme * chore: bump astro version * chore: update lockfile * Update mod.d.ts * feat: support `export const components` in MDX pages * chore: update mdx example * fix: update jsx-runtime with better slot support * refactor: remove object style support * chore: cleanup package exports * chore: add todo comment * refactor: improve isPage function, move to utils * refactor: dry up manual HMR updates * chore: add dev tests for MDX * chore: prefer set to array * chore: add changesets * fix(hmr): flip public/private route Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30Fix integration name (`prefetch` instead of `lit`) (#3778)Gravatar hippotastic 2-1/+6
2022-06-30[ci] update lockfile (#3771)Gravatar Fred K. Bot 1-114/+112
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
2022-06-30Integration Docs Next Steps (#3677)Gravatar Dan Jutan 11-314/+666
* sitemap readme skeleton + first sections * Revert "sitemap readme skeleton + first sections" This reverts commit cc55b312b6dc95522645002806d63f32c33d1956. * sitemap readme skeleton + first sections * remove canonicalURL option from sitemap * add customPages option to readme * sitemap examples * partytown * deno run command * reference deno example * node readme * netlify & vercel readmes * note that telemetry is installed * telemetry is *enabled*, not installed * Update packages/integrations/vercel/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/integrations/vercel/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * readme -> README * Update packages/integrations/deno/readme.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Update packages/integrations/deno/readme.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * qualify they * Update packages/integrations/sitemap/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * Uppercase README names * Update packages/integrations/partytown/README.md Co-authored-by: Chris Swithinbank <swithinbank@gmail.com> * imports -> import typo * update changeset Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-06-30[ci] formatGravatar tony-sull 1-2/+2
2022-06-30refactor to provide better cli error handling (#3768)Gravatar Fred K. Schott 2-43/+37
2022-06-30[ci] release (#3772)@astrojs/preact@0.3.1Gravatar Fred K. Bot 12-22/+23
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-30Added Cloudflare adapter to README.md (#3773)Gravatar Isaac McFadyen 1-0/+1
2022-06-30[ci] formatGravatar hippotastic 1-5/+4
2022-06-30Fix "Invalid hook call" warning (#3769)Gravatar hippotastic 2-9/+79
* Fix "Invalid hook call" warning * Fix eslint warnings * Apply code review suggestions
2022-06-29[ci] release (#3759)astro@1.0.0-beta.59@astrojs/telemetry@0.2.2@astrojs/preact@0.3.0Gravatar Fred K. Bot 42-121/+117
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-29[ci] formatGravatar FredKSchott 8-35/+36
2022-06-29manual lockfile update (#3751)Gravatar Fred K. Schott 3-2659/+2871
* lockfile update * update lockfile gen script * Update index.ts
2022-06-29add error event to telemetry (#3750)Gravatar Fred K. Schott 16-85/+270