parsely-button
Advanced tools
| interface ButtonProps { | ||
| label: string; | ||
| onClick: () => void; | ||
| } | ||
| declare const Button: ({ label, onClick }: ButtonProps) => import("react/jsx-runtime").JSX.Element; | ||
| export default Button; |
| export { default as Button } from './Button'; |
+661
| import * as lr from "react"; | ||
| function cr(g) { | ||
| if (g.__esModule) | ||
| return g; | ||
| var y = g.default; | ||
| if (typeof y == "function") { | ||
| var E = function b() { | ||
| return this instanceof b ? Reflect.construct(y, arguments, this.constructor) : y.apply(this, arguments); | ||
| }; | ||
| E.prototype = y.prototype; | ||
| } else | ||
| E = {}; | ||
| return Object.defineProperty(E, "__esModule", { value: !0 }), Object.keys(g).forEach(function(b) { | ||
| var m = Object.getOwnPropertyDescriptor(g, b); | ||
| Object.defineProperty(E, b, m.get ? m : { | ||
| enumerable: !0, | ||
| get: function() { | ||
| return g[b]; | ||
| } | ||
| }); | ||
| }), E; | ||
| } | ||
| var Z = { exports: {} }, I = {}; | ||
| const Se = /* @__PURE__ */ cr(lr); | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var Oe; | ||
| function dr() { | ||
| if (Oe) | ||
| return I; | ||
| Oe = 1; | ||
| var g = Se, y = Symbol.for("react.element"), E = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, m = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
| function k(T, c, w) { | ||
| var p, R = {}, O = null, Y = null; | ||
| w !== void 0 && (O = "" + w), c.key !== void 0 && (O = "" + c.key), c.ref !== void 0 && (Y = c.ref); | ||
| for (p in c) | ||
| b.call(c, p) && !$.hasOwnProperty(p) && (R[p] = c[p]); | ||
| if (T && T.defaultProps) | ||
| for (p in c = T.defaultProps, c) | ||
| R[p] === void 0 && (R[p] = c[p]); | ||
| return { $$typeof: y, type: T, key: O, ref: Y, props: R, _owner: m.current }; | ||
| } | ||
| return I.Fragment = E, I.jsx = k, I.jsxs = k, I; | ||
| } | ||
| var W = {}; | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var Pe; | ||
| function vr() { | ||
| return Pe || (Pe = 1, process.env.NODE_ENV !== "production" && function() { | ||
| var g = Se, y = Symbol.for("react.element"), E = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), $ = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), T = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), O = Symbol.for("react.lazy"), Y = Symbol.for("react.offscreen"), Q = Symbol.iterator, we = "@@iterator"; | ||
| function Ce(e) { | ||
| if (e === null || typeof e != "object") | ||
| return null; | ||
| var r = Q && e[Q] || e[we]; | ||
| return typeof r == "function" ? r : null; | ||
| } | ||
| var C = g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
| function l(e) { | ||
| { | ||
| for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) | ||
| t[n - 1] = arguments[n]; | ||
| je("error", e, t); | ||
| } | ||
| } | ||
| function je(e, r, t) { | ||
| { | ||
| var n = C.ReactDebugCurrentFrame, i = n.getStackAddendum(); | ||
| i !== "" && (r += "%s", t = t.concat([i])); | ||
| var u = t.map(function(o) { | ||
| return String(o); | ||
| }); | ||
| u.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, u); | ||
| } | ||
| } | ||
| var xe = !1, ke = !1, De = !1, Ae = !1, Fe = !1, ee; | ||
| ee = Symbol.for("react.module.reference"); | ||
| function Ie(e) { | ||
| return !!(typeof e == "string" || typeof e == "function" || e === b || e === $ || Fe || e === m || e === w || e === p || Ae || e === Y || xe || ke || De || typeof e == "object" && e !== null && (e.$$typeof === O || e.$$typeof === R || e.$$typeof === k || e.$$typeof === T || e.$$typeof === c || // This needs to include all possible module reference object | ||
| // types supported by any Flight configuration anywhere since | ||
| // we don't know which Flight build this will end up being used | ||
| // with. | ||
| e.$$typeof === ee || e.getModuleId !== void 0)); | ||
| } | ||
| function We(e, r, t) { | ||
| var n = e.displayName; | ||
| if (n) | ||
| return n; | ||
| var i = r.displayName || r.name || ""; | ||
| return i !== "" ? t + "(" + i + ")" : t; | ||
| } | ||
| function re(e) { | ||
| return e.displayName || "Context"; | ||
| } | ||
| function _(e) { | ||
| if (e == null) | ||
| return null; | ||
| if (typeof e.tag == "number" && l("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
| return e.displayName || e.name || null; | ||
| if (typeof e == "string") | ||
| return e; | ||
| switch (e) { | ||
| case b: | ||
| return "Fragment"; | ||
| case E: | ||
| return "Portal"; | ||
| case $: | ||
| return "Profiler"; | ||
| case m: | ||
| return "StrictMode"; | ||
| case w: | ||
| return "Suspense"; | ||
| case p: | ||
| return "SuspenseList"; | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case T: | ||
| var r = e; | ||
| return re(r) + ".Consumer"; | ||
| case k: | ||
| var t = e; | ||
| return re(t._context) + ".Provider"; | ||
| case c: | ||
| return We(e, e.render, "ForwardRef"); | ||
| case R: | ||
| var n = e.displayName || null; | ||
| return n !== null ? n : _(e.type) || "Memo"; | ||
| case O: { | ||
| var i = e, u = i._payload, o = i._init; | ||
| try { | ||
| return _(o(u)); | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
| var P = Object.assign, D = 0, te, ne, ae, oe, ie, ue, se; | ||
| function fe() { | ||
| } | ||
| fe.__reactDisabledLog = !0; | ||
| function $e() { | ||
| { | ||
| if (D === 0) { | ||
| te = console.log, ne = console.info, ae = console.warn, oe = console.error, ie = console.group, ue = console.groupCollapsed, se = console.groupEnd; | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| value: fe, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| info: e, | ||
| log: e, | ||
| warn: e, | ||
| error: e, | ||
| group: e, | ||
| groupCollapsed: e, | ||
| groupEnd: e | ||
| }); | ||
| } | ||
| D++; | ||
| } | ||
| } | ||
| function Ye() { | ||
| { | ||
| if (D--, D === 0) { | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| log: P({}, e, { | ||
| value: te | ||
| }), | ||
| info: P({}, e, { | ||
| value: ne | ||
| }), | ||
| warn: P({}, e, { | ||
| value: ae | ||
| }), | ||
| error: P({}, e, { | ||
| value: oe | ||
| }), | ||
| group: P({}, e, { | ||
| value: ie | ||
| }), | ||
| groupCollapsed: P({}, e, { | ||
| value: ue | ||
| }), | ||
| groupEnd: P({}, e, { | ||
| value: se | ||
| }) | ||
| }); | ||
| } | ||
| D < 0 && l("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
| } | ||
| } | ||
| var N = C.ReactCurrentDispatcher, B; | ||
| function L(e, r, t) { | ||
| { | ||
| if (B === void 0) | ||
| try { | ||
| throw Error(); | ||
| } catch (i) { | ||
| var n = i.stack.trim().match(/\n( *(at )?)/); | ||
| B = n && n[1] || ""; | ||
| } | ||
| return ` | ||
| ` + B + e; | ||
| } | ||
| } | ||
| var J = !1, M; | ||
| { | ||
| var Le = typeof WeakMap == "function" ? WeakMap : Map; | ||
| M = new Le(); | ||
| } | ||
| function le(e, r) { | ||
| if (!e || J) | ||
| return ""; | ||
| { | ||
| var t = M.get(e); | ||
| if (t !== void 0) | ||
| return t; | ||
| } | ||
| var n; | ||
| J = !0; | ||
| var i = Error.prepareStackTrace; | ||
| Error.prepareStackTrace = void 0; | ||
| var u; | ||
| u = N.current, N.current = null, $e(); | ||
| try { | ||
| if (r) { | ||
| var o = function() { | ||
| throw Error(); | ||
| }; | ||
| if (Object.defineProperty(o.prototype, "props", { | ||
| set: function() { | ||
| throw Error(); | ||
| } | ||
| }), typeof Reflect == "object" && Reflect.construct) { | ||
| try { | ||
| Reflect.construct(o, []); | ||
| } catch (v) { | ||
| n = v; | ||
| } | ||
| Reflect.construct(e, [], o); | ||
| } else { | ||
| try { | ||
| o.call(); | ||
| } catch (v) { | ||
| n = v; | ||
| } | ||
| e.call(o.prototype); | ||
| } | ||
| } else { | ||
| try { | ||
| throw Error(); | ||
| } catch (v) { | ||
| n = v; | ||
| } | ||
| e(); | ||
| } | ||
| } catch (v) { | ||
| if (v && n && typeof v.stack == "string") { | ||
| for (var a = v.stack.split(` | ||
| `), d = n.stack.split(` | ||
| `), s = a.length - 1, f = d.length - 1; s >= 1 && f >= 0 && a[s] !== d[f]; ) | ||
| f--; | ||
| for (; s >= 1 && f >= 0; s--, f--) | ||
| if (a[s] !== d[f]) { | ||
| if (s !== 1 || f !== 1) | ||
| do | ||
| if (s--, f--, f < 0 || a[s] !== d[f]) { | ||
| var h = ` | ||
| ` + a[s].replace(" at new ", " at "); | ||
| return e.displayName && h.includes("<anonymous>") && (h = h.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, h), h; | ||
| } | ||
| while (s >= 1 && f >= 0); | ||
| break; | ||
| } | ||
| } | ||
| } finally { | ||
| J = !1, N.current = u, Ye(), Error.prepareStackTrace = i; | ||
| } | ||
| var x = e ? e.displayName || e.name : "", S = x ? L(x) : ""; | ||
| return typeof e == "function" && M.set(e, S), S; | ||
| } | ||
| function Me(e, r, t) { | ||
| return le(e, !1); | ||
| } | ||
| function Ve(e) { | ||
| var r = e.prototype; | ||
| return !!(r && r.isReactComponent); | ||
| } | ||
| function V(e, r, t) { | ||
| if (e == null) | ||
| return ""; | ||
| if (typeof e == "function") | ||
| return le(e, Ve(e)); | ||
| if (typeof e == "string") | ||
| return L(e); | ||
| switch (e) { | ||
| case w: | ||
| return L("Suspense"); | ||
| case p: | ||
| return L("SuspenseList"); | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case c: | ||
| return Me(e.render); | ||
| case R: | ||
| return V(e.type, r, t); | ||
| case O: { | ||
| var n = e, i = n._payload, u = n._init; | ||
| try { | ||
| return V(u(i), r, t); | ||
| } catch { | ||
| } | ||
| } | ||
| } | ||
| return ""; | ||
| } | ||
| var A = Object.prototype.hasOwnProperty, ce = {}, de = C.ReactDebugCurrentFrame; | ||
| function U(e) { | ||
| if (e) { | ||
| var r = e._owner, t = V(e.type, e._source, r ? r.type : null); | ||
| de.setExtraStackFrame(t); | ||
| } else | ||
| de.setExtraStackFrame(null); | ||
| } | ||
| function Ue(e, r, t, n, i) { | ||
| { | ||
| var u = Function.call.bind(A); | ||
| for (var o in e) | ||
| if (u(e, o)) { | ||
| var a = void 0; | ||
| try { | ||
| if (typeof e[o] != "function") { | ||
| var d = Error((n || "React class") + ": " + t + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
| throw d.name = "Invariant Violation", d; | ||
| } | ||
| a = e[o](r, o, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
| } catch (s) { | ||
| a = s; | ||
| } | ||
| a && !(a instanceof Error) && (U(i), l("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, o, typeof a), U(null)), a instanceof Error && !(a.message in ce) && (ce[a.message] = !0, U(i), l("Failed %s type: %s", t, a.message), U(null)); | ||
| } | ||
| } | ||
| } | ||
| var Ne = Array.isArray; | ||
| function q(e) { | ||
| return Ne(e); | ||
| } | ||
| function Be(e) { | ||
| { | ||
| var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
| return t; | ||
| } | ||
| } | ||
| function Je(e) { | ||
| try { | ||
| return ve(e), !1; | ||
| } catch { | ||
| return !0; | ||
| } | ||
| } | ||
| function ve(e) { | ||
| return "" + e; | ||
| } | ||
| function pe(e) { | ||
| if (Je(e)) | ||
| return l("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), ve(e); | ||
| } | ||
| var F = C.ReactCurrentOwner, qe = { | ||
| key: !0, | ||
| ref: !0, | ||
| __self: !0, | ||
| __source: !0 | ||
| }, ge, ye, K; | ||
| K = {}; | ||
| function Ke(e) { | ||
| if (A.call(e, "ref")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.ref !== void 0; | ||
| } | ||
| function Ge(e) { | ||
| if (A.call(e, "key")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.key !== void 0; | ||
| } | ||
| function ze(e, r) { | ||
| if (typeof e.ref == "string" && F.current && r && F.current.stateNode !== r) { | ||
| var t = _(F.current.type); | ||
| K[t] || (l('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', _(F.current.type), e.ref), K[t] = !0); | ||
| } | ||
| } | ||
| function Xe(e, r) { | ||
| { | ||
| var t = function() { | ||
| ge || (ge = !0, l("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| function He(e, r) { | ||
| { | ||
| var t = function() { | ||
| ye || (ye = !0, l("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| var Ze = function(e, r, t, n, i, u, o) { | ||
| var a = { | ||
| // This tag allows us to uniquely identify this as a React Element | ||
| $$typeof: y, | ||
| // Built-in properties that belong on the element | ||
| type: e, | ||
| key: r, | ||
| ref: t, | ||
| props: o, | ||
| // Record the component responsible for creating this element. | ||
| _owner: u | ||
| }; | ||
| return a._store = {}, Object.defineProperty(a._store, "validated", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !0, | ||
| value: !1 | ||
| }), Object.defineProperty(a, "_self", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: n | ||
| }), Object.defineProperty(a, "_source", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: i | ||
| }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a; | ||
| }; | ||
| function Qe(e, r, t, n, i) { | ||
| { | ||
| var u, o = {}, a = null, d = null; | ||
| t !== void 0 && (pe(t), a = "" + t), Ge(r) && (pe(r.key), a = "" + r.key), Ke(r) && (d = r.ref, ze(r, i)); | ||
| for (u in r) | ||
| A.call(r, u) && !qe.hasOwnProperty(u) && (o[u] = r[u]); | ||
| if (e && e.defaultProps) { | ||
| var s = e.defaultProps; | ||
| for (u in s) | ||
| o[u] === void 0 && (o[u] = s[u]); | ||
| } | ||
| if (a || d) { | ||
| var f = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
| a && Xe(o, f), d && He(o, f); | ||
| } | ||
| return Ze(e, a, d, i, n, F.current, o); | ||
| } | ||
| } | ||
| var G = C.ReactCurrentOwner, be = C.ReactDebugCurrentFrame; | ||
| function j(e) { | ||
| if (e) { | ||
| var r = e._owner, t = V(e.type, e._source, r ? r.type : null); | ||
| be.setExtraStackFrame(t); | ||
| } else | ||
| be.setExtraStackFrame(null); | ||
| } | ||
| var z; | ||
| z = !1; | ||
| function X(e) { | ||
| return typeof e == "object" && e !== null && e.$$typeof === y; | ||
| } | ||
| function he() { | ||
| { | ||
| if (G.current) { | ||
| var e = _(G.current.type); | ||
| if (e) | ||
| return ` | ||
| Check the render method of \`` + e + "`."; | ||
| } | ||
| return ""; | ||
| } | ||
| } | ||
| function er(e) { | ||
| return ""; | ||
| } | ||
| var _e = {}; | ||
| function rr(e) { | ||
| { | ||
| var r = he(); | ||
| if (!r) { | ||
| var t = typeof e == "string" ? e : e.displayName || e.name; | ||
| t && (r = ` | ||
| Check the top-level render call using <` + t + ">."); | ||
| } | ||
| return r; | ||
| } | ||
| } | ||
| function Ee(e, r) { | ||
| { | ||
| if (!e._store || e._store.validated || e.key != null) | ||
| return; | ||
| e._store.validated = !0; | ||
| var t = rr(r); | ||
| if (_e[t]) | ||
| return; | ||
| _e[t] = !0; | ||
| var n = ""; | ||
| e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + _(e._owner.type) + "."), j(e), l('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null); | ||
| } | ||
| } | ||
| function Re(e, r) { | ||
| { | ||
| if (typeof e != "object") | ||
| return; | ||
| if (q(e)) | ||
| for (var t = 0; t < e.length; t++) { | ||
| var n = e[t]; | ||
| X(n) && Ee(n, r); | ||
| } | ||
| else if (X(e)) | ||
| e._store && (e._store.validated = !0); | ||
| else if (e) { | ||
| var i = Ce(e); | ||
| if (typeof i == "function" && i !== e.entries) | ||
| for (var u = i.call(e), o; !(o = u.next()).done; ) | ||
| X(o.value) && Ee(o.value, r); | ||
| } | ||
| } | ||
| } | ||
| function tr(e) { | ||
| { | ||
| var r = e.type; | ||
| if (r == null || typeof r == "string") | ||
| return; | ||
| var t; | ||
| if (typeof r == "function") | ||
| t = r.propTypes; | ||
| else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here. | ||
| // Inner props are checked in the reconciler. | ||
| r.$$typeof === R)) | ||
| t = r.propTypes; | ||
| else | ||
| return; | ||
| if (t) { | ||
| var n = _(r); | ||
| Ue(t, e.props, "prop", n, e); | ||
| } else if (r.PropTypes !== void 0 && !z) { | ||
| z = !0; | ||
| var i = _(r); | ||
| l("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", i || "Unknown"); | ||
| } | ||
| typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && l("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
| } | ||
| } | ||
| function nr(e) { | ||
| { | ||
| for (var r = Object.keys(e.props), t = 0; t < r.length; t++) { | ||
| var n = r[t]; | ||
| if (n !== "children" && n !== "key") { | ||
| j(e), l("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null); | ||
| break; | ||
| } | ||
| } | ||
| e.ref !== null && (j(e), l("Invalid attribute `ref` supplied to `React.Fragment`."), j(null)); | ||
| } | ||
| } | ||
| var me = {}; | ||
| function Te(e, r, t, n, i, u) { | ||
| { | ||
| var o = Ie(e); | ||
| if (!o) { | ||
| var a = ""; | ||
| (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
| var d = er(); | ||
| d ? a += d : a += he(); | ||
| var s; | ||
| e === null ? s = "null" : q(e) ? s = "array" : e !== void 0 && e.$$typeof === y ? (s = "<" + (_(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : s = typeof e, l("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", s, a); | ||
| } | ||
| var f = Qe(e, r, t, i, u); | ||
| if (f == null) | ||
| return f; | ||
| if (o) { | ||
| var h = r.children; | ||
| if (h !== void 0) | ||
| if (n) | ||
| if (q(h)) { | ||
| for (var x = 0; x < h.length; x++) | ||
| Re(h[x], e); | ||
| Object.freeze && Object.freeze(h); | ||
| } else | ||
| l("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
| else | ||
| Re(h, e); | ||
| } | ||
| if (A.call(r, "key")) { | ||
| var S = _(e), v = Object.keys(r).filter(function(fr) { | ||
| return fr !== "key"; | ||
| }), H = v.length > 0 ? "{key: someKey, " + v.join(": ..., ") + ": ...}" : "{key: someKey}"; | ||
| if (!me[S + H]) { | ||
| var sr = v.length > 0 ? "{" + v.join(": ..., ") + ": ...}" : "{}"; | ||
| l(`A props object containing a "key" prop is being spread into JSX: | ||
| let props = %s; | ||
| <%s {...props} /> | ||
| React keys must be passed directly to JSX without using spread: | ||
| let props = %s; | ||
| <%s key={someKey} {...props} />`, H, S, sr, S), me[S + H] = !0; | ||
| } | ||
| } | ||
| return e === b ? nr(f) : tr(f), f; | ||
| } | ||
| } | ||
| function ar(e, r, t) { | ||
| return Te(e, r, t, !0); | ||
| } | ||
| function or(e, r, t) { | ||
| return Te(e, r, t, !1); | ||
| } | ||
| var ir = or, ur = ar; | ||
| W.Fragment = b, W.jsx = ir, W.jsxs = ur; | ||
| }()), W; | ||
| } | ||
| process.env.NODE_ENV === "production" ? Z.exports = dr() : Z.exports = vr(); | ||
| var pr = Z.exports; | ||
| const gr = ({ label: g, onClick: y }) => /* @__PURE__ */ pr.jsx("button", { onClick: y, children: g }); | ||
| export { | ||
| gr as Button | ||
| }; |
| (function(R,D){typeof exports=="object"&&typeof module<"u"?D(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],D):(R=typeof globalThis<"u"?globalThis:R||self,D(R.index={},R.React))})(this,function(R,D){"use strict";function Ce(c){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(c){for(const y in c)if(y!=="default"){const v=Object.getOwnPropertyDescriptor(c,y);Object.defineProperty(l,y,v.get?v:{enumerable:!0,get:()=>c[y]})}}return l.default=c,Object.freeze(l)}const xe=Ce(D);function ke(c){if(c.__esModule)return c;var l=c.default;if(typeof l=="function"){var y=function v(){return this instanceof v?Reflect.construct(l,arguments,this.constructor):l.apply(this,arguments)};y.prototype=l.prototype}else y={};return Object.defineProperty(y,"__esModule",{value:!0}),Object.keys(c).forEach(function(v){var O=Object.getOwnPropertyDescriptor(c,v);Object.defineProperty(y,v,O.get?O:{enumerable:!0,get:function(){return c[v]}})}),y}var q={exports:{}},A={};const re=ke(xe);/** | ||
| * @license React | ||
| * react-jsx-runtime.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */var te;function De(){if(te)return A;te=1;var c=re,l=Symbol.for("react.element"),y=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,O=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,M={key:!0,ref:!0,__self:!0,__source:!0};function I(T,p,w){var h,E={},S=null,L=null;w!==void 0&&(S=""+w),p.key!==void 0&&(S=""+p.key),p.ref!==void 0&&(L=p.ref);for(h in p)v.call(p,h)&&!M.hasOwnProperty(h)&&(E[h]=p[h]);if(T&&T.defaultProps)for(h in p=T.defaultProps,p)E[h]===void 0&&(E[h]=p[h]);return{$$typeof:l,type:T,key:S,ref:L,props:E,_owner:O.current}}return A.Fragment=y,A.jsx=I,A.jsxs=I,A}var F={};/** | ||
| * @license React | ||
| * react-jsx-runtime.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */var ne;function Ae(){return ne||(ne=1,process.env.NODE_ENV!=="production"&&function(){var c=re,l=Symbol.for("react.element"),y=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),I=Symbol.for("react.provider"),T=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),ae=Symbol.iterator,We="@@iterator";function $e(e){if(e===null||typeof e!="object")return null;var r=ae&&e[ae]||e[We];return typeof r=="function"?r:null}var C=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function d(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ye("error",e,t)}}function Ye(e,r,t){{var n=C.ReactDebugCurrentFrame,i=n.getStackAddendum();i!==""&&(r+="%s",t=t.concat([i]));var u=t.map(function(o){return String(o)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Me=!1,Le=!1,Ve=!1,Ue=!1,Ne=!1,oe;oe=Symbol.for("react.module.reference");function Be(e){return!!(typeof e=="string"||typeof e=="function"||e===v||e===M||Ne||e===O||e===w||e===h||Ue||e===L||Me||Le||Ve||typeof e=="object"&&e!==null&&(e.$$typeof===S||e.$$typeof===E||e.$$typeof===I||e.$$typeof===T||e.$$typeof===p||e.$$typeof===oe||e.getModuleId!==void 0))}function qe(e,r,t){var n=e.displayName;if(n)return n;var i=r.displayName||r.name||"";return i!==""?t+"("+i+")":t}function ie(e){return e.displayName||"Context"}function m(e){if(e==null)return null;if(typeof e.tag=="number"&&d("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case v:return"Fragment";case y:return"Portal";case M:return"Profiler";case O:return"StrictMode";case w:return"Suspense";case h:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case T:var r=e;return ie(r)+".Consumer";case I:var t=e;return ie(t._context)+".Provider";case p:return qe(e,e.render,"ForwardRef");case E:var n=e.displayName||null;return n!==null?n:m(e.type)||"Memo";case S:{var i=e,u=i._payload,o=i._init;try{return m(o(u))}catch{return null}}}return null}var P=Object.assign,W=0,ue,se,fe,ce,le,de,ve;function pe(){}pe.__reactDisabledLog=!0;function Je(){{if(W===0){ue=console.log,se=console.info,fe=console.warn,ce=console.error,le=console.group,de=console.groupCollapsed,ve=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function Ke(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:ue}),info:P({},e,{value:se}),warn:P({},e,{value:fe}),error:P({},e,{value:ce}),group:P({},e,{value:le}),groupCollapsed:P({},e,{value:de}),groupEnd:P({},e,{value:ve})})}W<0&&d("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=C.ReactCurrentDispatcher,K;function V(e,r,t){{if(K===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);K=n&&n[1]||""}return` | ||
| `+K+e}}var z=!1,U;{var ze=typeof WeakMap=="function"?WeakMap:Map;U=new ze}function ge(e,r){if(!e||z)return"";{var t=U.get(e);if(t!==void 0)return t}var n;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=J.current,J.current=null,Je();try{if(r){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(b){n=b}Reflect.construct(e,[],o)}else{try{o.call()}catch(b){n=b}e.call(o.prototype)}}else{try{throw Error()}catch(b){n=b}e()}}catch(b){if(b&&n&&typeof b.stack=="string"){for(var a=b.stack.split(` | ||
| `),g=n.stack.split(` | ||
| `),s=a.length-1,f=g.length-1;s>=1&&f>=0&&a[s]!==g[f];)f--;for(;s>=1&&f>=0;s--,f--)if(a[s]!==g[f]){if(s!==1||f!==1)do if(s--,f--,f<0||a[s]!==g[f]){var _=` | ||
| `+a[s].replace(" at new "," at ");return e.displayName&&_.includes("<anonymous>")&&(_=_.replace("<anonymous>",e.displayName)),typeof e=="function"&&U.set(e,_),_}while(s>=1&&f>=0);break}}}finally{z=!1,J.current=u,Ke(),Error.prepareStackTrace=i}var k=e?e.displayName||e.name:"",j=k?V(k):"";return typeof e=="function"&&U.set(e,j),j}function Ge(e,r,t){return ge(e,!1)}function Xe(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function N(e,r,t){if(e==null)return"";if(typeof e=="function")return ge(e,Xe(e));if(typeof e=="string")return V(e);switch(e){case w:return V("Suspense");case h:return V("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case p:return Ge(e.render);case E:return N(e.type,r,t);case S:{var n=e,i=n._payload,u=n._init;try{return N(u(i),r,t)}catch{}}}return""}var $=Object.prototype.hasOwnProperty,ye={},be=C.ReactDebugCurrentFrame;function B(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);be.setExtraStackFrame(t)}else be.setExtraStackFrame(null)}function He(e,r,t,n,i){{var u=Function.call.bind($);for(var o in e)if(u(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var g=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g.name="Invariant Violation",g}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(B(i),d("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),B(null)),a instanceof Error&&!(a.message in ye)&&(ye[a.message]=!0,B(i),d("Failed %s type: %s",t,a.message),B(null))}}}var Ze=Array.isArray;function G(e){return Ze(e)}function Qe(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function er(e){try{return he(e),!1}catch{return!0}}function he(e){return""+e}function _e(e){if(er(e))return d("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(e)),he(e)}var Y=C.ReactCurrentOwner,rr={key:!0,ref:!0,__self:!0,__source:!0},me,Ee,X;X={};function tr(e){if($.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function nr(e){if($.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function ar(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var t=m(Y.current.type);X[t]||(d('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',m(Y.current.type),e.ref),X[t]=!0)}}function or(e,r){{var t=function(){me||(me=!0,d("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ir(e,r){{var t=function(){Ee||(Ee=!0,d("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var ur=function(e,r,t,n,i,u,o){var a={$$typeof:l,type:e,key:r,ref:t,props:o,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function sr(e,r,t,n,i){{var u,o={},a=null,g=null;t!==void 0&&(_e(t),a=""+t),nr(r)&&(_e(r.key),a=""+r.key),tr(r)&&(g=r.ref,ar(r,i));for(u in r)$.call(r,u)&&!rr.hasOwnProperty(u)&&(o[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)o[u]===void 0&&(o[u]=s[u])}if(a||g){var f=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&or(o,f),g&&ir(o,f)}return ur(e,a,g,i,n,Y.current,o)}}var H=C.ReactCurrentOwner,Re=C.ReactDebugCurrentFrame;function x(e){if(e){var r=e._owner,t=N(e.type,e._source,r?r.type:null);Re.setExtraStackFrame(t)}else Re.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===l}function Oe(){{if(H.current){var e=m(H.current.type);if(e)return` | ||
| Check the render method of \``+e+"`."}return""}}function fr(e){return""}var Te={};function cr(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
| Check the top-level render call using <`+t+">.")}return r}}function Se(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=cr(r);if(Te[t])return;Te[t]=!0;var n="";e&&e._owner&&e._owner!==H.current&&(n=" It was passed a child from "+m(e._owner.type)+"."),x(e),d('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),x(null)}}function Pe(e,r){{if(typeof e!="object")return;if(G(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Se(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var i=$e(e);if(typeof i=="function"&&i!==e.entries)for(var u=i.call(e),o;!(o=u.next()).done;)Q(o.value)&&Se(o.value,r)}}}function lr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===p||r.$$typeof===E))t=r.propTypes;else return;if(t){var n=m(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var i=m(r);d("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",i||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&d("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function dr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){x(e),d("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),x(null);break}}e.ref!==null&&(x(e),d("Invalid attribute `ref` supplied to `React.Fragment`."),x(null))}}var je={};function we(e,r,t,n,i,u){{var o=Be(e);if(!o){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var g=fr();g?a+=g:a+=Oe();var s;e===null?s="null":G(e)?s="array":e!==void 0&&e.$$typeof===l?(s="<"+(m(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,d("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var f=sr(e,r,t,i,u);if(f==null)return f;if(o){var _=r.children;if(_!==void 0)if(n)if(G(_)){for(var k=0;k<_.length;k++)Pe(_[k],e);Object.freeze&&Object.freeze(_)}else d("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Pe(_,e)}if($.call(r,"key")){var j=m(e),b=Object.keys(r).filter(function(hr){return hr!=="key"}),ee=b.length>0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!je[j+ee]){var br=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";d(`A props object containing a "key" prop is being spread into JSX: | ||
| let props = %s; | ||
| <%s {...props} /> | ||
| React keys must be passed directly to JSX without using spread: | ||
| let props = %s; | ||
| <%s key={someKey} {...props} />`,ee,j,br,j),je[j+ee]=!0}}return e===v?dr(f):lr(f),f}}function vr(e,r,t){return we(e,r,t,!0)}function pr(e,r,t){return we(e,r,t,!1)}var gr=pr,yr=vr;F.Fragment=v,F.jsx=gr,F.jsxs=yr}()),F}process.env.NODE_ENV==="production"?q.exports=De():q.exports=Ae();var Fe=q.exports;const Ie=({label:c,onClick:l})=>Fe.jsx("button",{onClick:l,children:c});R.Button=Ie,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})}); |
+48
-2
| { | ||
| "name": "parsely-button", | ||
| "version": "0.0.0", | ||
| "description": "make my own button" | ||
| "version": "0.0.2", | ||
| "description": "make my own button", | ||
| "type": "module", | ||
| "types": "dist/index.d.ts", | ||
| "main": "dist/index.js", | ||
| "module": "dist/index.js", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "dev": "vite", | ||
| "build": "tsc && vite build", | ||
| "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
| "preview": "vite preview", | ||
| "storybook": "storybook dev -p 6006", | ||
| "build-storybook": "storybook build" | ||
| }, | ||
| "dependencies": { | ||
| "react": "^18.2.0", | ||
| "react-dom": "^18.2.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@chromatic-com/storybook": "^1.3.3", | ||
| "@storybook/addon-essentials": "^8.0.9", | ||
| "@storybook/addon-interactions": "^8.0.9", | ||
| "@storybook/addon-links": "^8.0.9", | ||
| "@storybook/addon-onboarding": "^8.0.9", | ||
| "@storybook/blocks": "^8.0.9", | ||
| "@storybook/react": "^8.0.9", | ||
| "@storybook/react-vite": "^8.0.9", | ||
| "@storybook/test": "^8.0.9", | ||
| "@types/jest": "^29.5.12", | ||
| "@types/node": "^20.12.7", | ||
| "@types/react": "^18.2.66", | ||
| "@types/react-dom": "^18.2.22", | ||
| "@typescript-eslint/eslint-plugin": "^7.2.0", | ||
| "@typescript-eslint/parser": "^7.2.0", | ||
| "@vitejs/plugin-react-swc": "^3.5.0", | ||
| "eslint": "^8.57.0", | ||
| "eslint-plugin-react-hooks": "^4.6.0", | ||
| "eslint-plugin-react-refresh": "^0.4.6", | ||
| "eslint-plugin-storybook": "^0.8.0", | ||
| "path": "^0.12.7", | ||
| "storybook": "^8.0.9", | ||
| "typescript": "^5.2.2", | ||
| "vite": "^5.2.0", | ||
| "vite-plugin-dts": "^3.9.0" | ||
| } | ||
| } |
| module.exports = { | ||
| root: true, | ||
| env: { browser: true, es2020: true }, | ||
| extends: [ | ||
| "eslint:recommended", | ||
| "plugin:@typescript-eslint/recommended", | ||
| "plugin:react-hooks/recommended", | ||
| "plugin:storybook/recommended", | ||
| ], | ||
| ignorePatterns: ["dist", ".eslintrc.cjs"], | ||
| parser: "@typescript-eslint/parser", | ||
| plugins: ["react-refresh"], | ||
| rules: { | ||
| "react-refresh/only-export-components": [ | ||
| "warn", | ||
| { allowConstantExport: true }, | ||
| ], | ||
| }, | ||
| }; |
| import type { StorybookConfig } from "@storybook/react-vite"; | ||
| const config: StorybookConfig = { | ||
| stories: ["../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"], | ||
| addons: [ | ||
| "@storybook/addon-onboarding", | ||
| "@storybook/addon-links", | ||
| "@storybook/addon-essentials", | ||
| "@chromatic-com/storybook", | ||
| "@storybook/addon-interactions", | ||
| ], | ||
| framework: { | ||
| name: "@storybook/react-vite", | ||
| options: {}, | ||
| }, | ||
| docs: { | ||
| autodocs: "tag", | ||
| }, | ||
| }; | ||
| export default config; |
| import type { Preview } from "@storybook/react"; | ||
| const preview: Preview = { | ||
| parameters: { | ||
| controls: { | ||
| matchers: { | ||
| color: /(background|color)$/i, | ||
| date: /Date$/i, | ||
| }, | ||
| }, | ||
| }, | ||
| }; | ||
| export default preview; |
-13
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Vite + React + TS</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script type="module" src="/src/main.tsx"></script> | ||
| </body> | ||
| </html> |
-42
| #root { | ||
| max-width: 1280px; | ||
| margin: 0 auto; | ||
| padding: 2rem; | ||
| text-align: center; | ||
| } | ||
| .logo { | ||
| height: 6em; | ||
| padding: 1.5em; | ||
| will-change: filter; | ||
| transition: filter 300ms; | ||
| } | ||
| .logo:hover { | ||
| filter: drop-shadow(0 0 2em #646cffaa); | ||
| } | ||
| .logo.react:hover { | ||
| filter: drop-shadow(0 0 2em #61dafbaa); | ||
| } | ||
| @keyframes logo-spin { | ||
| from { | ||
| transform: rotate(0deg); | ||
| } | ||
| to { | ||
| transform: rotate(360deg); | ||
| } | ||
| } | ||
| @media (prefers-reduced-motion: no-preference) { | ||
| a:nth-of-type(2) .logo { | ||
| animation: logo-spin infinite 20s linear; | ||
| } | ||
| } | ||
| .card { | ||
| padding: 2em; | ||
| } | ||
| .read-the-docs { | ||
| color: #888; | ||
| } |
-18
| import React from 'react'; | ||
| import Button from './lib/Button'; | ||
| import './App.css'; | ||
| function App() { | ||
| const handleClick = () => { | ||
| alert('Button clicked!'); | ||
| }; | ||
| return ( | ||
| <div> | ||
| <h1>Button Component Example</h1> | ||
| <Button label="Click me" onClick={handleClick} /> | ||
| </div> | ||
| ); | ||
| } | ||
| export default App; |
| :root { | ||
| font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; | ||
| line-height: 1.5; | ||
| font-weight: 400; | ||
| color-scheme: light dark; | ||
| color: rgba(255, 255, 255, 0.87); | ||
| background-color: #242424; | ||
| font-synthesis: none; | ||
| text-rendering: optimizeLegibility; | ||
| -webkit-font-smoothing: antialiased; | ||
| -moz-osx-font-smoothing: grayscale; | ||
| } | ||
| a { | ||
| font-weight: 500; | ||
| color: #646cff; | ||
| text-decoration: inherit; | ||
| } | ||
| a:hover { | ||
| color: #535bf2; | ||
| } | ||
| body { | ||
| margin: 0; | ||
| display: flex; | ||
| place-items: center; | ||
| min-width: 320px; | ||
| min-height: 100vh; | ||
| } | ||
| h1 { | ||
| font-size: 3.2em; | ||
| line-height: 1.1; | ||
| } | ||
| button { | ||
| border-radius: 8px; | ||
| border: 1px solid transparent; | ||
| padding: 0.6em 1.2em; | ||
| font-size: 1em; | ||
| font-weight: 500; | ||
| font-family: inherit; | ||
| background-color: #1a1a1a; | ||
| cursor: pointer; | ||
| transition: border-color 0.25s; | ||
| } | ||
| button:hover { | ||
| border-color: #646cff; | ||
| } | ||
| button:focus, | ||
| button:focus-visible { | ||
| outline: 4px auto -webkit-focus-ring-color; | ||
| } | ||
| @media (prefers-color-scheme: light) { | ||
| :root { | ||
| color: #213547; | ||
| background-color: #ffffff; | ||
| } | ||
| a:hover { | ||
| color: #747bff; | ||
| } | ||
| button { | ||
| background-color: #f9f9f9; | ||
| } | ||
| } |
| interface ButtonProps { | ||
| label: string; | ||
| onClick: () => void; | ||
| } | ||
| const Button = ({ label, onClick }: ButtonProps) => { | ||
| return <button onClick={onClick}>{label}</button>; | ||
| }; | ||
| export default Button; |
| export { default as Button } from './Button'; |
-10
| import React from 'react' | ||
| import ReactDOM from 'react-dom/client' | ||
| import App from './App.tsx' | ||
| import './index.css' | ||
| ReactDOM.createRoot(document.getElementById('root')!).render( | ||
| <React.StrictMode> | ||
| <App /> | ||
| </React.StrictMode>, | ||
| ) |
| import type { Meta, StoryObj } from '@storybook/react'; | ||
| import Button from '../lib/Button'; | ||
| const meta = { | ||
| title: 'Button', | ||
| component: Button, | ||
| } satisfies Meta<typeof Button>; | ||
| export default meta; | ||
| type Story = StoryObj<typeof meta>; | ||
| export const Default: Story = { | ||
| args: { | ||
| label: 'Click Me!', | ||
| onClick: () => alert('Button clicked!'), | ||
| }, | ||
| }; |
| /// <reference types="vite/client" /> |
| { | ||
| "compilerOptions": { | ||
| "target": "ES2020", | ||
| "useDefineForClassFields": true, | ||
| "lib": ["ES2020", "DOM", "DOM.Iterable"], | ||
| "module": "ESNext", | ||
| "skipLibCheck": true, | ||
| /* Bundler mode */ | ||
| "moduleResolution": "bundler", | ||
| "allowImportingTsExtensions": true, | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "noEmit": true, | ||
| "jsx": "react-jsx", | ||
| /* Linting */ | ||
| "strict": true, | ||
| "noUnusedLocals": true, | ||
| "noUnusedParameters": true, | ||
| "noFallthroughCasesInSwitch": true, | ||
| /* Testing */ | ||
| "types": ["jest"], | ||
| "esModuleInterop": true | ||
| }, | ||
| "include": ["src/lib"], | ||
| "exclude": ["node_modules", "dist", "**/*.test.ts"], | ||
| "references": [{ "path": "./tsconfig.node.json" }] | ||
| } |
| { | ||
| "compilerOptions": { | ||
| "composite": true, | ||
| "skipLibCheck": true, | ||
| "module": "ESNext", | ||
| "moduleResolution": "bundler", | ||
| "allowSyntheticDefaultImports": true, | ||
| "strict": true | ||
| }, | ||
| "include": ["vite.config.ts"] | ||
| } |
| import * as path from "path"; | ||
| import { defineConfig } from "vite"; | ||
| import react from "@vitejs/plugin-react-swc"; | ||
| import dts from "vite-plugin-dts"; | ||
| export default defineConfig({ | ||
| build: { | ||
| lib: { | ||
| entry: path.resolve(__dirname, "src/lib/index.ts"), | ||
| name: "index", | ||
| fileName: "index", | ||
| }, | ||
| rollupOptions: { | ||
| external: ["react"], | ||
| output: { | ||
| globals: { | ||
| react: "React", | ||
| }, | ||
| }, | ||
| }, | ||
| commonjsOptions: { | ||
| esmExternals: ["react"], | ||
| }, | ||
| }, | ||
| plugins: [react(), dts()], | ||
| }); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
45770
256.05%747
188.42%Yes
NaN2
Infinity%25
Infinity%6
-64.71%3
50%6
500%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added