@plasmicapp/loader-react 1.0.252 → 1.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PlasmicComponent.d.ts +19 -19
- package/dist/PlasmicRootProvider.d.ts +92 -92
- package/dist/bundles.d.ts +7 -7
- package/dist/component-lookup.d.ts +21 -21
- package/dist/global-variants.d.ts +13 -13
- package/dist/index.d.ts +15 -12
- package/dist/index.js +1464 -5
- package/dist/index.js.map +7 -0
- package/dist/loader-react-server.d.ts +72 -72
- package/dist/loader.d.ts +173 -173
- package/dist/prepass.d.ts +43 -43
- package/dist/react-server.d.ts +5 -0
- package/dist/react-server.js +473 -0
- package/dist/react-server.js.map +7 -0
- package/dist/render.d.ts +27 -27
- package/dist/shared-exports.d.ts +6 -0
- package/dist/usePlasmicComponent.d.ts +15 -15
- package/dist/utils.d.ts +30 -30
- package/dist/variation.d.ts +9 -9
- package/package.json +22 -54
- package/dist/index-react-server.d.ts +0 -5
- package/dist/index-shared.d.ts +0 -6
- package/dist/loader-react.cjs.development.js +0 -2748
- package/dist/loader-react.cjs.development.js.map +0 -1
- package/dist/loader-react.cjs.production.min.js +0 -2
- package/dist/loader-react.cjs.production.min.js.map +0 -1
- package/dist/loader-react.esm.js +0 -2666
- package/dist/loader-react.esm.js.map +0 -1
- package/dist-react-server/PlasmicComponent.d.ts +0 -19
- package/dist-react-server/PlasmicRootProvider.d.ts +0 -92
- package/dist-react-server/bundles.d.ts +0 -7
- package/dist-react-server/component-lookup.d.ts +0 -21
- package/dist-react-server/global-variants.d.ts +0 -13
- package/dist-react-server/index-react-server.d.ts +0 -5
- package/dist-react-server/index-shared.d.ts +0 -6
- package/dist-react-server/index.d.ts +0 -12
- package/dist-react-server/index.js +0 -8
- package/dist-react-server/loader-react-server.d.ts +0 -72
- package/dist-react-server/loader-react.cjs.development.js +0 -1315
- package/dist-react-server/loader-react.cjs.development.js.map +0 -1
- package/dist-react-server/loader-react.cjs.production.min.js +0 -2
- package/dist-react-server/loader-react.cjs.production.min.js.map +0 -1
- package/dist-react-server/loader-react.esm.js +0 -1306
- package/dist-react-server/loader-react.esm.js.map +0 -1
- package/dist-react-server/loader.d.ts +0 -173
- package/dist-react-server/prepass.d.ts +0 -43
- package/dist-react-server/render.d.ts +0 -27
- package/dist-react-server/usePlasmicComponent.d.ts +0 -15
- package/dist-react-server/utils.d.ts +0 -30
- package/dist-react-server/variation.d.ts +0 -9
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loader-react.esm.js","sources":["../../../node_modules/regenerator-runtime/runtime.js","../src/bundles.ts","../src/utils.tsx","../src/loader-react-server.ts","../src/index-react-server.ts"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","import {\n ComponentMeta,\n getBundleSubset,\n LoaderBundleOutput,\n} from '@plasmicapp/loader-core';\nimport type { ComponentRenderData } from './loader';\n\nfunction getUsedComps(allComponents: ComponentMeta[], entryCompIds: string[]) {\n const q: string[] = [...entryCompIds];\n const seenIds = new Set<string>(entryCompIds);\n const componentMetaById = new Map<string, ComponentMeta>(\n allComponents.map((meta) => [meta.id, meta])\n );\n const usedComps: ComponentMeta[] = [];\n while (q.length > 0) {\n const [id] = q.splice(0, 1);\n const meta = componentMetaById.get(id);\n if (!meta) {\n continue;\n }\n usedComps.push(meta);\n meta.usedComponents.forEach((usedCompId) => {\n if (!seenIds.has(usedCompId)) {\n seenIds.add(usedCompId);\n q.push(usedCompId);\n }\n });\n }\n return usedComps;\n}\n\nexport function prepComponentData(\n bundle: LoaderBundleOutput,\n compMetas: ComponentMeta[],\n opts?: {\n target?: 'browser' | 'server';\n }\n): ComponentRenderData {\n if (compMetas.length === 0) {\n return {\n entryCompMetas: bundle.components,\n bundle: bundle,\n remoteFontUrls: [],\n };\n }\n\n const usedComps = getUsedComps(\n bundle.components,\n compMetas.map((compMeta) => compMeta.id)\n );\n const compPaths = usedComps.map((compMeta) => compMeta.entry);\n const subBundle = getBundleSubset(\n bundle,\n [\n 'entrypoint.css',\n ...compPaths,\n 'root-provider.js',\n ...bundle.projects\n .map((x) => x.globalContextsProviderFileName)\n .filter((x) => !!x),\n // We need to explicitly include global context provider components\n // to make sure they are kept in bundle.components. That's because\n // for esbuild, just the globalContextsProviderFileName is not enough,\n // because it will import a chunk that includes the global context\n // component, instead of importing that global context component's\n // entry file. And because nothing depends on the global context component's\n // entry file, we end up excluding the global context component from\n // bundle.components, which then makes its substitution not work.\n // Instead, we forcibly include it here (we'll definitely need it anyway!).\n ...bundle.components\n .filter((c) => c.isGlobalContextProvider)\n .map((c) => c.entry),\n ...bundle.globalGroups.map((g) => g.contextFile),\n ],\n opts\n );\n\n const remoteFontUrls: string[] = [];\n subBundle.projects.forEach((p) =>\n remoteFontUrls.push(...p.remoteFonts.map((f) => f.url))\n );\n\n return {\n entryCompMetas: compMetas,\n bundle: subBundle,\n remoteFontUrls,\n };\n}\n\nexport function mergeBundles(\n target: LoaderBundleOutput,\n from: LoaderBundleOutput\n) {\n const existingCompIds = new Set(target.components.map((c) => c.id));\n\n const newCompMetas = from.components.filter(\n (m) => !existingCompIds.has(m.id)\n );\n if (newCompMetas.length > 0) {\n target = { ...target, components: [...target.components, ...newCompMetas] };\n }\n\n const existingProjects = new Set(target.projects.map((p) => p.id));\n const newProjects = from.projects.filter((p) => !existingProjects.has(p.id));\n if (newProjects.length > 0) {\n target = {\n ...target,\n projects: [...target.projects, ...newProjects],\n };\n }\n\n const existingModules = {\n browser: new Set(target.modules.browser.map((m) => m.fileName)),\n server: new Set(target.modules.server.map((m) => m.fileName)),\n };\n const newModules = {\n browser: from.modules.browser.filter(\n (m) => !existingModules.browser.has(m.fileName)\n ),\n server: from.modules.server.filter(\n (m) => !existingModules.server.has(m.fileName)\n ),\n };\n if (newModules.browser.length > 0 || newModules.server.length > 0) {\n target = {\n ...target,\n modules: {\n browser: [...target.modules.browser, ...newModules.browser],\n server: [...target.modules.server, ...newModules.server],\n },\n };\n }\n\n const existingGlobalIds = new Set(target.globalGroups.map((g) => g.id));\n const newGlobals = from.globalGroups.filter(\n (g) => !existingGlobalIds.has(g.id)\n );\n if (newGlobals.length > 0) {\n target = {\n ...target,\n globalGroups: [...target.globalGroups, ...newGlobals],\n };\n }\n\n const existingExternals = new Set(target.external);\n const newExternals = target.external.filter((x) => !existingExternals.has(x));\n if (newExternals.length > 0) {\n target = { ...target, external: [...target.external, ...newExternals] };\n }\n\n const existingSplitIds = new Set(target.activeSplits.map((s) => s.id));\n const newSplits =\n from.activeSplits.filter((s) => !existingSplitIds.has(s.id)) ?? [];\n if (newSplits.length > 0) {\n target = {\n ...target,\n activeSplits: [...target.activeSplits, ...newSplits],\n };\n }\n\n return target;\n}\n\nexport const convertBundlesToComponentRenderData = (\n bundles: LoaderBundleOutput[],\n compMetas: ComponentMeta[]\n): ComponentRenderData | null => {\n if (bundles.length === 0) {\n return null;\n }\n\n const mergedBundles = bundles.reduce((prev, cur) => mergeBundles(prev, cur));\n return prepComponentData(mergedBundles, compMetas);\n};\n","import { ComponentMeta } from '@plasmicapp/loader-core';\nimport pascalcase from 'pascalcase';\nimport * as React from 'react';\n\nexport const isBrowser = typeof window !== 'undefined';\n\nexport type ComponentLookupSpec =\n | string\n | { name: string; projectId?: string; isCode?: boolean };\n\ninterface FullNameLookupSpec {\n name: string;\n rawName?: string;\n projectId?: string;\n isCode?: boolean;\n}\n\ninterface FullPathLookupSpec {\n path: string;\n projectId?: string;\n}\n\ntype FullLookupSpec = FullNameLookupSpec | FullPathLookupSpec;\n\nexport function useForceUpdate() {\n const [, setTick] = React.useState(0);\n const update = React.useCallback(() => {\n setTick((tick) => tick + 1);\n }, []);\n return update;\n}\n\nexport function useStableLookupSpec(spec: ComponentLookupSpec) {\n return useStableLookupSpecs(spec)[0];\n}\n\nexport function useStableLookupSpecs(...specs: ComponentLookupSpec[]) {\n const [stableSpecs, setStableSpecs] = React.useState(specs);\n\n React.useEffect(() => {\n if (\n specs.length !== stableSpecs.length ||\n specs.some((s, i) => !areLookupSpecsEqual(s, stableSpecs[i]))\n ) {\n setStableSpecs(specs);\n }\n }, [specs, stableSpecs]);\n return stableSpecs;\n}\n\nfunction areLookupSpecsEqual(\n spec1: ComponentLookupSpec,\n spec2: ComponentLookupSpec\n) {\n if (spec1 === spec2) {\n return true;\n }\n if (typeof spec1 !== typeof spec2) {\n return false;\n }\n\n const fullSpec1 = toFullLookup(spec1);\n const fullSpec2 = toFullLookup(spec2);\n return (\n ((isNameSpec(fullSpec1) &&\n isNameSpec(fullSpec2) &&\n fullSpec1.name === fullSpec2.name &&\n fullSpec1.isCode === fullSpec2.isCode) ||\n (isPathSpec(fullSpec1) &&\n isPathSpec(fullSpec2) &&\n fullSpec1.path === fullSpec2.path)) &&\n fullSpec1.projectId === fullSpec2.projectId\n );\n}\n\nfunction isNameSpec(lookup: FullLookupSpec): lookup is FullNameLookupSpec {\n return 'name' in lookup;\n}\n\nfunction isPathSpec(lookup: FullLookupSpec): lookup is FullPathLookupSpec {\n return 'path' in lookup;\n}\n\nfunction toFullLookup(lookup: ComponentLookupSpec): FullLookupSpec {\n const namePart = typeof lookup === 'string' ? lookup : lookup.name;\n const projectId = typeof lookup === 'string' ? undefined : lookup.projectId;\n const codeComponent = typeof lookup === 'string' ? undefined : lookup.isCode;\n\n if (codeComponent !== true && namePart.startsWith('/')) {\n return { path: normalizePath(namePart), projectId };\n } else {\n return {\n name: codeComponent ? namePart : normalizeName(namePart),\n rawName: namePart.trim(),\n projectId,\n isCode: codeComponent,\n };\n }\n}\n\nfunction normalizePath(path: string) {\n return path.trim();\n}\n\nfunction normalizeName(name: string) {\n // Not a full normalization, but should be good enough\n return pascalcase(name).trim();\n}\n\nexport function useIsMounted(): () => boolean {\n const ref = React.useRef<boolean>(false);\n const isMounted = React.useCallback(() => ref.current, []);\n\n React.useEffect(() => {\n ref.current = true;\n return () => {\n ref.current = false;\n };\n }, []);\n\n return isMounted;\n}\n\n/**\n * Check if `lookup` resolves to `pagePath`. If it's a match, return an object\n * containing path params; otherwise, returns false.\n *\n * For example,\n * - `matchesPagePath(\"/hello/[name]\", \"/hello/world\")` -> `{params: {name:\n * \"world\"}}`\n * - `matchesPagePath(\"/hello/[name]\", \"/\")` -> `false`\n * - `matchesPagePath(\"/\", \"\")` -> `{params: {}}`\n */\nexport function matchesPagePath(\n pagePath: string,\n lookup: string\n): { params: Record<string, string> } | false {\n // Remove trailing slashes from both `pagePath` and `lookup`.\n pagePath = pagePath.replace(/^\\/*/, '').replace(/\\/*$/, '');\n lookup = lookup.replace(/^\\/*/, '').replace(/\\/*$/, '');\n\n // paramNames will contain a list of parameter names; e.g. if pagePath\n // is \"/products/[slug]/[variant]\" it will contain [\"slug\", \"variant\"].\n const paramNames = (pagePath.match(/\\[([^\\]]*)\\]/g) || []).map((group) =>\n group.slice(1, -1)\n );\n\n const pagePathRegExp = new RegExp(\n '^' + pagePath.replace(/\\[[^\\]]*\\]/g, '([^/]+)') + '$'\n );\n const maybeVals = lookup.match(pagePathRegExp)?.slice(1);\n if (!maybeVals) {\n return false;\n }\n\n const params: Record<string, string> = {};\n for (let i = 0; i < paramNames.length; i++) {\n params[paramNames[i]] = maybeVals[i];\n }\n\n return { params };\n}\n\nexport function isDynamicPagePath(path: string): boolean {\n return !!path.match(/\\[[^/]*\\]/);\n}\n\nfunction matchesCompMeta(lookup: FullLookupSpec, meta: ComponentMeta) {\n if (lookup.projectId && meta.projectId !== lookup.projectId) {\n return false;\n }\n\n return isNameSpec(lookup)\n ? (lookup.name === meta.name ||\n lookup.rawName === meta.name ||\n lookup.rawName === meta.displayName) &&\n (lookup.isCode == null || lookup.isCode === meta.isCode)\n : !!(meta.path && matchesPagePath(meta.path, lookup.path));\n}\n\nexport function getCompMetas(\n metas: ComponentMeta[],\n lookup: ComponentLookupSpec\n) {\n const full = toFullLookup(lookup);\n return metas\n .filter((meta) => matchesCompMeta(full, meta))\n .map<ComponentMeta & { params?: Record<string, string> }>((meta) => {\n if (isNameSpec(full) || !meta.path) {\n return meta;\n }\n\n const match = matchesPagePath(meta.path, full.path);\n if (!match) {\n return meta;\n }\n\n return { ...meta, params: match.params };\n })\n .sort(\n (meta1, meta2) =>\n // We sort the matched component metas by the number of path params, so\n // if there are two pages `/products/foo` and `/products/[slug]`,\n // the first one will have higher precedence.\n Array.from(Object.keys(meta1.params || {})).length -\n Array.from(Object.keys(meta2.params || {})).length\n );\n}\n\nexport function getLookupSpecName(lookup: ComponentLookupSpec) {\n if (typeof lookup === 'string') {\n return lookup;\n } else if (lookup.projectId) {\n return `${lookup.name} (project ${lookup.projectId})`;\n } else {\n return lookup.name;\n }\n}\n\nexport function uniq<T>(elements: T[]): T[] {\n return Array.from(new Set(elements));\n}\n","import {\n LoaderBundleCache,\n PageMeta,\n PlasmicModulesFetcher,\n PlasmicTracker,\n} from '@plasmicapp/loader-core';\nimport { ComponentMeta, LoaderBundleOutput } from '@plasmicapp/loader-fetcher';\nimport { mergeBundles, prepComponentData } from './bundles';\nimport { ComponentRenderData, FetchPagesOpts } from './loader';\nimport {\n ComponentLookupSpec,\n getCompMetas,\n getLookupSpecName,\n isBrowser,\n isDynamicPagePath,\n} from './utils';\n\nexport interface InitOptions {\n projects: {\n id: string;\n token: string;\n version?: string;\n }[];\n cache?: LoaderBundleCache;\n platform?: 'react' | 'nextjs' | 'gatsby';\n preview?: boolean;\n host?: string;\n onClientSideFetch?: 'warn' | 'error';\n i18nKeyScheme?: 'content' | 'hash';\n\n /**\n * By default, fetchComponentData() and fetchPages() calls cached in memory\n * with the PlasmicComponentLoader instance. If alwaysFresh is true, then\n * data is always freshly fetched over the network.\n */\n alwaysFresh?: boolean;\n}\n\n/** Subset of loader functionality that works on React Server Components. */\nexport class ReactServerPlasmicComponentLoader {\n private readonly opts: InitOptions;\n private readonly fetcher: PlasmicModulesFetcher;\n private readonly tracker: PlasmicTracker;\n private readonly onBundleMerged?: () => void;\n private readonly onBundleFetched?: () => void;\n\n private bundle: LoaderBundleOutput = {\n modules: {\n browser: [],\n server: [],\n },\n components: [],\n globalGroups: [],\n external: [],\n projects: [],\n activeSplits: [],\n };\n\n constructor(args: {\n opts: InitOptions;\n fetcher: PlasmicModulesFetcher;\n tracker: PlasmicTracker;\n /** Called after `mergeBundle` (including `fetch` calls). */\n onBundleMerged?: () => void;\n /** Called after any `fetch` calls. */\n onBundleFetched?: () => void;\n }) {\n this.opts = args.opts;\n this.fetcher = args.fetcher;\n this.tracker = args.tracker;\n this.onBundleMerged = args.onBundleMerged;\n this.onBundleFetched = args.onBundleFetched;\n }\n\n private maybeGetCompMetas(...specs: ComponentLookupSpec[]) {\n const found = new Set<ComponentMeta>();\n const missing: ComponentLookupSpec[] = [];\n for (const spec of specs) {\n const filteredMetas = getCompMetas(this.bundle.components, spec);\n if (filteredMetas.length > 0) {\n filteredMetas.forEach((meta) => found.add(meta));\n } else {\n missing.push(spec);\n }\n }\n return { found: Array.from(found.keys()), missing };\n }\n\n async maybeFetchComponentData(\n specs: ComponentLookupSpec[],\n opts?: FetchComponentDataOpts\n ): Promise<ComponentRenderData | null>;\n async maybeFetchComponentData(\n ...specs: ComponentLookupSpec[]\n ): Promise<ComponentRenderData | null>;\n async maybeFetchComponentData(\n ...args: any[]\n ): Promise<ComponentRenderData | null> {\n const { specs, opts } = parseFetchComponentDataArgs(...args);\n const returnWithSpecsToFetch = async (\n specsToFetch: ComponentLookupSpec[]\n ) => {\n await this.fetchMissingData({ missingSpecs: specsToFetch });\n const {\n found: existingMetas2,\n missing: missingSpecs2,\n } = this.maybeGetCompMetas(...specs);\n if (missingSpecs2.length > 0) {\n return null;\n }\n\n return prepComponentData(this.bundle, existingMetas2, opts);\n };\n\n if (this.opts.alwaysFresh) {\n // If alwaysFresh, then we treat all specs as missing\n return await returnWithSpecsToFetch(specs);\n }\n\n // Else we only fetch actually missing specs\n const {\n found: existingMetas,\n missing: missingSpecs,\n } = this.maybeGetCompMetas(...specs);\n if (missingSpecs.length === 0) {\n return prepComponentData(this.bundle, existingMetas, opts);\n }\n\n return await returnWithSpecsToFetch(missingSpecs);\n }\n\n async fetchComponentData(\n specs: ComponentLookupSpec[],\n opts?: FetchComponentDataOpts\n ): Promise<ComponentRenderData>;\n async fetchComponentData(\n ...specs: ComponentLookupSpec[]\n ): Promise<ComponentRenderData>;\n async fetchComponentData(...args: any[]): Promise<ComponentRenderData> {\n const { specs, opts } = parseFetchComponentDataArgs(...args);\n const data = await this.maybeFetchComponentData(specs, opts);\n\n if (!data) {\n const { missing: missingSpecs } = this.maybeGetCompMetas(...specs);\n throw new Error(\n `Unable to find components ${missingSpecs\n .map(getLookupSpecName)\n .join(', ')}`\n );\n }\n\n return data;\n }\n\n async fetchPages(opts?: FetchPagesOpts) {\n this.maybeReportClientSideFetch(\n () => `Plasmic: fetching all page metadata in the browser`\n );\n const data = await this.fetchAllData();\n return data.components.filter(\n (comp) =>\n comp.isPage &&\n comp.path &&\n (opts?.includeDynamicPages || !isDynamicPagePath(comp.path))\n ) as PageMeta[];\n }\n\n async fetchComponents() {\n this.maybeReportClientSideFetch(\n () => `Plasmic: fetching all component metadata in the browser`\n );\n const data = await this.fetchAllData();\n return data.components;\n }\n\n getActiveSplits() {\n return this.bundle.activeSplits;\n }\n\n private async fetchMissingData(opts: {\n missingSpecs: ComponentLookupSpec[];\n }) {\n // TODO: do better than just fetching everything\n this.maybeReportClientSideFetch(\n () =>\n `Plasmic: fetching missing components in the browser: ${opts.missingSpecs\n .map((spec) => getLookupSpecName(spec))\n .join(', ')}`\n );\n return this.fetchAllData();\n }\n\n private maybeReportClientSideFetch(mkMsg: () => string) {\n if (isBrowser && this.opts.onClientSideFetch) {\n const msg = mkMsg();\n if (this.opts.onClientSideFetch === 'warn') {\n console.warn(msg);\n } else {\n throw new Error(msg);\n }\n }\n }\n\n private async fetchAllData() {\n const bundle = await this.fetcher.fetchAllData();\n this.tracker.trackFetch();\n this.mergeBundle(bundle);\n this.onBundleFetched?.();\n return bundle;\n }\n\n mergeBundle(bundle: LoaderBundleOutput) {\n this.bundle = mergeBundles(bundle, this.bundle);\n this.onBundleMerged?.();\n }\n\n getBundle(): LoaderBundleOutput {\n return this.bundle;\n }\n\n clearCache() {\n this.bundle = {\n modules: {\n browser: [],\n server: [],\n },\n components: [],\n globalGroups: [],\n external: [],\n projects: [],\n activeSplits: [],\n };\n }\n}\n\nexport interface FetchComponentDataOpts {\n /**\n * Will fetch either code targeting SSR or browser hydration in the\n * returned bundle.\n *\n * By default, the target is browser. That's okay, because even when\n * doing SSR, as long as you are using the same instance of PlasmicLoader\n * that was used to fetch component data, it will still know how to get at\n * the server code.\n *\n * But, if you are building your own SSR solution, where fetching and rendering\n * are using different instances of PlasmicLoader, then you'll want to make\n * sure that when you fetch, you are fetching the right one to be used in the\n * right environment for either SSR or browser hydration.\n */\n target?: 'server' | 'browser';\n}\n\nfunction parseFetchComponentDataArgs(\n specs: ComponentLookupSpec[],\n opts?: FetchComponentDataOpts\n): { specs: ComponentLookupSpec[]; opts?: FetchComponentDataOpts };\nfunction parseFetchComponentDataArgs(\n ...specs: ComponentLookupSpec[]\n): { specs: ComponentLookupSpec[]; opts?: FetchComponentDataOpts };\nfunction parseFetchComponentDataArgs(...args: any[]) {\n let specs: ComponentLookupSpec[];\n let opts: FetchComponentDataOpts | undefined;\n if (Array.isArray(args[0])) {\n specs = args[0];\n opts = args[1];\n } else {\n specs = args;\n opts = undefined;\n }\n return { specs, opts };\n}\n","import 'server-only';\n\nimport { PlasmicModulesFetcher, PlasmicTracker } from '@plasmicapp/loader-core';\nimport {\n InitOptions,\n ReactServerPlasmicComponentLoader,\n} from './loader-react-server';\n\nexport * from './index-shared';\nexport { ReactServerPlasmicComponentLoader };\n\nexport function initPlasmicLoader(\n opts: InitOptions\n): ReactServerPlasmicComponentLoader {\n return new ReactServerPlasmicComponentLoader({\n opts,\n fetcher: new PlasmicModulesFetcher(opts),\n tracker: new PlasmicTracker({\n projectIds: opts.projects.map((p) => p.id),\n platform: opts.platform,\n preview: opts.preview,\n }),\n });\n}\n"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","undefined","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","obj","key","value","defineProperty","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","fn","arg","type","call","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","displayName","defineIteratorMethods","forEach","method","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","then","unwrapped","error","previousPromise","enqueue","callInvokeWithMethodAndArg","async","Promise","iter","next","done","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","keys","object","reverse","length","pop","iterable","iteratorMethod","isNaN","i","skipTempReset","prev","charAt","slice","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","globalThis","Function","getUsedComps","allComponents","entryCompIds","q","seenIds","Set","componentMetaById","Map","map","meta","id","usedComps","splice","get","usedComponents","usedCompId","has","add","prepComponentData","bundle","compMetas","opts","entryCompMetas","components","remoteFontUrls","compMeta","compPaths","subBundle","getBundleSubset","projects","x","globalContextsProviderFileName","filter","c","isGlobalContextProvider","globalGroups","g","contextFile","p","remoteFonts","f","url","mergeBundles","target","from","existingCompIds","newCompMetas","m","existingProjects","newProjects","existingModules","browser","modules","fileName","server","newModules","existingGlobalIds","newGlobals","existingExternals","external","newExternals","existingSplitIds","activeSplits","s","newSplits","convertBundlesToComponentRenderData","bundles","mergedBundles","reduce","cur","isBrowser","window","isNameSpec","lookup","toFullLookup","namePart","projectId","codeComponent","isCode","startsWith","path","normalizePath","normalizeName","rawName","trim","pascalcase","matchesPagePath","pagePath","replace","paramNames","match","group","pagePathRegExp","RegExp","maybeVals","params","isDynamicPagePath","matchesCompMeta","getCompMetas","metas","full","sort","meta1","meta2","Array","getLookupSpecName","ReactServerPlasmicComponentLoader","args","fetcher","tracker","onBundleMerged","onBundleFetched","maybeGetCompMetas","found","missing","specs","spec","filteredMetas","maybeFetchComponentData","parseFetchComponentDataArgs","returnWithSpecsToFetch","specsToFetch","fetchMissingData","missingSpecs","existingMetas2","missingSpecs2","alwaysFresh","existingMetas","fetchComponentData","data","join","fetchPages","maybeReportClientSideFetch","fetchAllData","comp","isPage","includeDynamicPages","fetchComponents","getActiveSplits","mkMsg","onClientSideFetch","msg","console","warn","trackFetch","mergeBundle","getBundle","clearCache","isArray","initPlasmicLoader","PlasmicModulesFetcher","PlasmicTracker","projectIds","platform","preview"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;AACA;AACA;AACA;AACA;;EAEA,IAAIA,OAAO,GAAI,UAAUC,OAAO,EAAE;;IAGhC,IAAIC,EAAE,GAAGC,MAAM,CAACC,SAAS;IACzB,IAAIC,MAAM,GAAGH,EAAE,CAACI,cAAc;IAC9B,IAAIC,WAAS,CAAC;IACd,IAAIC,OAAO,GAAG,OAAOC,MAAM,KAAK,UAAU,GAAGA,MAAM,GAAG,EAAE;IACxD,IAAIC,cAAc,GAAGF,OAAO,CAACG,QAAQ,IAAI,YAAY;IACrD,IAAIC,mBAAmB,GAAGJ,OAAO,CAACK,aAAa,IAAI,iBAAiB;IACpE,IAAIC,iBAAiB,GAAGN,OAAO,CAACO,WAAW,IAAI,eAAe;IAE9D,SAASC,MAAM,CAACC,GAAG,EAAEC,GAA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IAAI9F,IAAwC;EAAC,mCAFPsF,IAAW;IAAXA,IAAW;;EAGjD,IAAIH,KAAK,CAAC4C,OAAO,CAACzC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;IAC1BQ,KAAK,GAAGR,IAAI,CAAC,CAAC,CAAC;IACftF,IAAI,GAAGsF,IAAI,CAAC,CAAC,CAAC;GACf,MAAM;IACLQ,KAAK,GAAGR,IAAI;IACZtF,IAAI,GAAGjK,SAAS;;EAElB,OAAO;IAAE+P,KAAK,EAALA,KAAK;IAAE9F,IAAI,EAAJA;GAAM;AACxB;;SCpQgBgI,iBAAiB,CAC/BhI,IAAiB;EAEjB,OAAO,IAAIqF,iCAAiC,CAAC;IAC3CrF,IAAI,EAAJA,IAAI;IACJuF,OAAO,EAAE,IAAI0C,qBAAqB,CAACjI,IAAI,CAAC;IACxCwF,OAAO,EAAE,IAAI0C,cAAc,CAAC;MAC1BC,UAAU,EAAEnI,IAAI,CAACQ,QAAQ,CAACrB,GAAG,CAAC,UAAC8B,CAAC;QAAA,OAAKA,CAAC,CAAC5B,EAAE;QAAC;MAC1C+I,QAAQ,EAAEpI,IAAI,CAACoI,QAAQ;MACvBC,OAAO,EAAErI,IAAI,CAACqI;KACf;GACF,CAAC;AACJ;;;;"}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { CodeComponentMeta as InternalCodeComponentMeta, GlobalContextMeta as InternalGlobalContextMeta, StateHelpers, StateSpec, TokenRegistration, TraitMeta } from '@plasmicapp/host';
|
|
2
|
-
import { ComponentMeta, LoaderBundleOutput, TrackRenderOptions } from '@plasmicapp/loader-core';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { ComponentLookup } from './component-lookup';
|
|
5
|
-
import { FetchComponentDataOpts, InitOptions } from './loader-react-server';
|
|
6
|
-
import type { GlobalVariantSpec } from './PlasmicRootProvider';
|
|
7
|
-
import { ComponentLookupSpec } from './utils';
|
|
8
|
-
export interface ComponentRenderData {
|
|
9
|
-
entryCompMetas: (ComponentMeta & {
|
|
10
|
-
params?: Record<string, string>;
|
|
11
|
-
})[];
|
|
12
|
-
bundle: LoaderBundleOutput;
|
|
13
|
-
remoteFontUrls: string[];
|
|
14
|
-
}
|
|
15
|
-
interface PlasmicRootWatcher {
|
|
16
|
-
onDataFetched?: () => void;
|
|
17
|
-
}
|
|
18
|
-
export declare type CodeComponentMeta<P> = Omit<InternalCodeComponentMeta<P>, 'importPath' | 'componentHelpers' | 'states'> & {
|
|
19
|
-
/**
|
|
20
|
-
* The path to be used when importing the component in the generated code.
|
|
21
|
-
* It can be the name of the package that contains the component, or the path
|
|
22
|
-
* to the file in the project (relative to the root directory).
|
|
23
|
-
* Optional: not used by Plasmic headless API, only by codegen.
|
|
24
|
-
*/
|
|
25
|
-
importPath?: string;
|
|
26
|
-
/**
|
|
27
|
-
* The states helpers are registered together with the states for the Plasmic headless API
|
|
28
|
-
*/
|
|
29
|
-
states?: Record<string, StateSpec & StateHelpers<P, any>>;
|
|
30
|
-
};
|
|
31
|
-
export declare type GlobalContextMeta<P> = Omit<InternalGlobalContextMeta<P>, 'importPath'> & {
|
|
32
|
-
/**
|
|
33
|
-
* The path to be used when importing the component in the generated code.
|
|
34
|
-
* It can be the name of the package that contains the component, or the path
|
|
35
|
-
* to the file in the project (relative to the root directory).
|
|
36
|
-
* Optional: not used by Plasmic headless API, only by codegen.
|
|
37
|
-
*/
|
|
38
|
-
importPath?: string;
|
|
39
|
-
};
|
|
40
|
-
export declare type FetchPagesOpts = {
|
|
41
|
-
/**
|
|
42
|
-
* Whether to include dynamic pages in fetchPages() output. A page is
|
|
43
|
-
* considered dynamic if its path contains some param between brackets,
|
|
44
|
-
* e.g. "[slug]".
|
|
45
|
-
*/
|
|
46
|
-
includeDynamicPages?: boolean;
|
|
47
|
-
};
|
|
48
|
-
export declare class InternalPlasmicComponentLoader {
|
|
49
|
-
private opts;
|
|
50
|
-
private readonly reactServerLoader;
|
|
51
|
-
private readonly registry;
|
|
52
|
-
private subs;
|
|
53
|
-
private roots;
|
|
54
|
-
private globalVariants;
|
|
55
|
-
private tracker;
|
|
56
|
-
constructor(opts: InitOptions);
|
|
57
|
-
getBundle(): LoaderBundleOutput;
|
|
58
|
-
setGlobalVariants(globalVariants: GlobalVariantSpec[]): void;
|
|
59
|
-
getGlobalVariants(): GlobalVariantSpec[];
|
|
60
|
-
registerModules(modules: Record<string, any>): void;
|
|
61
|
-
substituteComponent<P>(component: React.ComponentType<P>, name: ComponentLookupSpec): void;
|
|
62
|
-
private internalSubstituteComponent;
|
|
63
|
-
registerComponent<T extends React.ComponentType<any>>(component: T, meta: CodeComponentMeta<React.ComponentProps<T>>): void;
|
|
64
|
-
registerGlobalContext<T extends React.ComponentType<any>>(context: T, meta: GlobalContextMeta<React.ComponentProps<T>>): void;
|
|
65
|
-
registerTrait(trait: string, meta: TraitMeta): void;
|
|
66
|
-
registerToken(token: TokenRegistration): void;
|
|
67
|
-
registerPrefetchedBundle(bundle: LoaderBundleOutput): void;
|
|
68
|
-
subscribePlasmicRoot(watcher: PlasmicRootWatcher): void;
|
|
69
|
-
unsubscribePlasmicRoot(watcher: PlasmicRootWatcher): void;
|
|
70
|
-
clearCache(): void;
|
|
71
|
-
getLookup(): ComponentLookup;
|
|
72
|
-
maybeFetchComponentData(specs: ComponentLookupSpec[], opts?: FetchComponentDataOpts): Promise<ComponentRenderData | null>;
|
|
73
|
-
maybeFetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData | null>;
|
|
74
|
-
fetchComponentData(specs: ComponentLookupSpec[], opts?: FetchComponentDataOpts): Promise<ComponentRenderData>;
|
|
75
|
-
fetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData>;
|
|
76
|
-
fetchPages(opts?: FetchPagesOpts): Promise<import("@plasmicapp/loader-core").PageMeta[]>;
|
|
77
|
-
fetchComponents(): Promise<ComponentMeta[]>;
|
|
78
|
-
getActiveSplits(): import("@plasmicapp/loader-core").Split[];
|
|
79
|
-
trackConversion(value?: number): void;
|
|
80
|
-
getActiveVariation(opts: {
|
|
81
|
-
traits: Record<string, string | number | boolean>;
|
|
82
|
-
getKnownValue: (key: string) => string | undefined;
|
|
83
|
-
updateKnownValue: (key: string, value: string) => void;
|
|
84
|
-
}): Promise<Record<string, string>>;
|
|
85
|
-
getTeamIds(): string[];
|
|
86
|
-
getProjectIds(): string[];
|
|
87
|
-
trackRender(opts?: TrackRenderOptions): void;
|
|
88
|
-
private refreshRegistry;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Library for fetching component data, and registering
|
|
92
|
-
* custom components.
|
|
93
|
-
*/
|
|
94
|
-
export declare class PlasmicComponentLoader {
|
|
95
|
-
private __internal;
|
|
96
|
-
constructor(internal: InternalPlasmicComponentLoader);
|
|
97
|
-
/**
|
|
98
|
-
* Sets global variants to be used for all components. Note that
|
|
99
|
-
* this is not reactive, and will not re-render all components
|
|
100
|
-
* already mounted; instead, it should be used to activate global
|
|
101
|
-
* variants that should always be activated for the lifetime of this
|
|
102
|
-
* app. If you'd like to reactively change the global variants,
|
|
103
|
-
* you should specify them via <PlasmicRootProvider />
|
|
104
|
-
*/
|
|
105
|
-
setGlobalVariants(globalVariants: GlobalVariantSpec[]): void;
|
|
106
|
-
registerModules(modules: Record<string, any>): void;
|
|
107
|
-
/**
|
|
108
|
-
* Register custom components that should be swapped in for
|
|
109
|
-
* components defined in your project. You can use this to
|
|
110
|
-
* swap in / substitute a Plasmic component with a "real" component.
|
|
111
|
-
*/
|
|
112
|
-
substituteComponent<P>(component: React.ComponentType<P>, name: ComponentLookupSpec): void;
|
|
113
|
-
/**
|
|
114
|
-
* Register code components to be used on Plasmic Editor.
|
|
115
|
-
*/
|
|
116
|
-
registerComponent<T extends React.ComponentType<any>>(component: T, meta: CodeComponentMeta<React.ComponentProps<T>>): void;
|
|
117
|
-
/**
|
|
118
|
-
* [[deprecated]] Please use `substituteComponent` instead for component
|
|
119
|
-
* substitution, or the other `registerComponent` overload to register
|
|
120
|
-
* code components to be used on Plasmic Editor.
|
|
121
|
-
*
|
|
122
|
-
* @see `substituteComponent`
|
|
123
|
-
*/
|
|
124
|
-
registerComponent<T extends React.ComponentType<any>>(component: T, name: ComponentLookupSpec): void;
|
|
125
|
-
private warnedRegisterComponent;
|
|
126
|
-
registerGlobalContext<T extends React.ComponentType<any>>(context: T, meta: GlobalContextMeta<React.ComponentProps<T>>): void;
|
|
127
|
-
registerTrait(trait: string, meta: TraitMeta): void;
|
|
128
|
-
registerToken(token: TokenRegistration): void;
|
|
129
|
-
/**
|
|
130
|
-
* Pre-fetches component data needed to for PlasmicLoader to render
|
|
131
|
-
* these components. Should be passed into PlasmicRootProvider as
|
|
132
|
-
* the prefetchedData prop.
|
|
133
|
-
*
|
|
134
|
-
* You can look up a component either by:
|
|
135
|
-
* - the name of the component
|
|
136
|
-
* - the path for a page component
|
|
137
|
-
* - an array of strings that make up parts of the path
|
|
138
|
-
* - object { name: "name_or_path", projectId: ...}, to specify which project
|
|
139
|
-
* to use, if multiple projects have the same component name
|
|
140
|
-
*
|
|
141
|
-
* Throws an Error if a specified component to fetch does not exist in
|
|
142
|
-
* the Plasmic project.
|
|
143
|
-
*/
|
|
144
|
-
fetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData>;
|
|
145
|
-
/**
|
|
146
|
-
* Like fetchComponentData(), but returns null instead of throwing an Error
|
|
147
|
-
* when a component is not found. Useful when you are implementing a catch-all
|
|
148
|
-
* page and want to check if a specific path had been defined for Plasmic.
|
|
149
|
-
*/
|
|
150
|
-
maybeFetchComponentData(...specs: ComponentLookupSpec[]): Promise<ComponentRenderData | null>;
|
|
151
|
-
/**
|
|
152
|
-
* Returns all the page component metadata for these projects.
|
|
153
|
-
*/
|
|
154
|
-
fetchPages(opts?: FetchPagesOpts): Promise<import("@plasmicapp/loader-core").PageMeta[]>;
|
|
155
|
-
/**
|
|
156
|
-
* Returns all components metadata for these projects.
|
|
157
|
-
*/
|
|
158
|
-
fetchComponents(): Promise<ComponentMeta[]>;
|
|
159
|
-
protected _getActiveVariation(opts: {
|
|
160
|
-
traits: Record<string, string | number | boolean>;
|
|
161
|
-
getKnownValue: (key: string) => string | undefined;
|
|
162
|
-
updateKnownValue: (key: string, value: string) => void;
|
|
163
|
-
}): Promise<Record<string, string>>;
|
|
164
|
-
getActiveVariation(opts: {
|
|
165
|
-
known?: Record<string, string>;
|
|
166
|
-
traits: Record<string, string | number | boolean>;
|
|
167
|
-
}): Promise<Record<string, string>>;
|
|
168
|
-
getExternalVariation(variation: Record<string, string>): Record<string, string>;
|
|
169
|
-
getActiveSplits(): import("@plasmicapp/loader-core").Split[];
|
|
170
|
-
trackConversion(value?: number): void;
|
|
171
|
-
clearCache(): void;
|
|
172
|
-
}
|
|
173
|
-
export {};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Performs a prepass over Plasmic content, kicking off the necessary
|
|
4
|
-
* data fetches, and populating the fetched data into a cache. This
|
|
5
|
-
* cache can be passed as prefetchedQueryData into PlasmicRootProvider.
|
|
6
|
-
*
|
|
7
|
-
* To limit rendering errors that can occur when you do this, we recommend
|
|
8
|
-
* that you pass in _only_ the PlasmicComponents that you are planning to use
|
|
9
|
-
* as the argument. For example:
|
|
10
|
-
*
|
|
11
|
-
* const cache = await extractPlasmicQueryData(
|
|
12
|
-
* <PlasmicRootProvider loader={PLASMIC} prefetchedData={plasmicData}>
|
|
13
|
-
* <PlasmicComponent component="Home" componentProps={{
|
|
14
|
-
* // Specify the component prop overrides you are planning to use
|
|
15
|
-
* // to render the page, as they may change what data is fetched.
|
|
16
|
-
* ...
|
|
17
|
-
* }} />
|
|
18
|
-
* <PlasmicComponent component="NavBar" componentProps={{
|
|
19
|
-
* ...
|
|
20
|
-
* }} />
|
|
21
|
-
* ...
|
|
22
|
-
* </PlasmicRootProvider>
|
|
23
|
-
* );
|
|
24
|
-
*
|
|
25
|
-
* If your PlasmicComponent will be wrapping components that require special
|
|
26
|
-
* context set up, you should also wrap the element above with those context
|
|
27
|
-
* providers.
|
|
28
|
-
*
|
|
29
|
-
* You should avoid passing in elements that are not related to Plasmic, as any
|
|
30
|
-
* rendering errors from those elements during the prepass may result in data
|
|
31
|
-
* not being populated in the cache.
|
|
32
|
-
*
|
|
33
|
-
* @param element a React element containing instances of PlasmicComponent.
|
|
34
|
-
* Will attempt to satisfy all data needs from usePlasmicDataQuery()
|
|
35
|
-
* in this element tree.
|
|
36
|
-
* @returns an object mapping query key to fetched data
|
|
37
|
-
*/
|
|
38
|
-
export declare function extractPlasmicQueryData(element: React.ReactElement): Promise<Record<string, any>>;
|
|
39
|
-
/**
|
|
40
|
-
* Runs react-ssr-prepass on `element`, while isolating rendering errors
|
|
41
|
-
* as much as possible for each PlasmicComponent instance.
|
|
42
|
-
*/
|
|
43
|
-
export declare function plasmicPrepass(element: React.ReactElement): Promise<void>;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ComponentRenderData, PlasmicComponentLoader } from './loader';
|
|
2
|
-
import { GlobalVariantSpec } from './PlasmicRootProvider';
|
|
3
|
-
import { ComponentLookupSpec } from './utils';
|
|
4
|
-
export declare function renderToElement(loader: PlasmicComponentLoader, target: HTMLElement, lookup: ComponentLookupSpec, opts?: {
|
|
5
|
-
prefetchedData?: ComponentRenderData;
|
|
6
|
-
componentProps?: any;
|
|
7
|
-
globalVariants?: GlobalVariantSpec[];
|
|
8
|
-
prefetchedQueryData?: Record<string, any>;
|
|
9
|
-
}): Promise<void>;
|
|
10
|
-
export declare function renderToString(loader: PlasmicComponentLoader, lookup: ComponentLookupSpec, opts?: {
|
|
11
|
-
prefetchedData?: ComponentRenderData;
|
|
12
|
-
componentProps?: any;
|
|
13
|
-
globalVariants?: GlobalVariantSpec[];
|
|
14
|
-
prefetchedQueryData?: Record<string, any>;
|
|
15
|
-
}): string;
|
|
16
|
-
export declare function extractPlasmicQueryDataFromElement(loader: PlasmicComponentLoader, lookup: ComponentLookupSpec, opts?: {
|
|
17
|
-
prefetchedData?: ComponentRenderData;
|
|
18
|
-
componentProps?: any;
|
|
19
|
-
globalVariants?: GlobalVariantSpec[];
|
|
20
|
-
prefetchedQueryData?: Record<string, any>;
|
|
21
|
-
}): Promise<Record<string, any>>;
|
|
22
|
-
export declare function hydrateFromElement(loader: PlasmicComponentLoader, target: HTMLElement, lookup: ComponentLookupSpec, opts?: {
|
|
23
|
-
prefetchedData?: ComponentRenderData;
|
|
24
|
-
componentProps?: any;
|
|
25
|
-
globalVariants?: GlobalVariantSpec[];
|
|
26
|
-
prefetchedQueryData?: Record<string, any>;
|
|
27
|
-
}): Promise<void>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ComponentLookupSpec } from './utils';
|
|
3
|
-
/**
|
|
4
|
-
* Hook that fetches and returns a React component for rendering the argument
|
|
5
|
-
* Plasmic component. Returns undefined if the component data is still
|
|
6
|
-
* being fetched.
|
|
7
|
-
*
|
|
8
|
-
* @param opts.forceOriginal if you used PlasmicComponentLoader.registerComponent,
|
|
9
|
-
* then normally usePlasmicComponent will return the registered component.
|
|
10
|
-
* You can set forceOriginal to true if you want to return the Plasmic-generated
|
|
11
|
-
* component instead.
|
|
12
|
-
*/
|
|
13
|
-
export declare function usePlasmicComponent<P extends React.ComponentType = any>(spec: ComponentLookupSpec, opts?: {
|
|
14
|
-
forceOriginal?: boolean;
|
|
15
|
-
}): P;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ComponentMeta } from '@plasmicapp/loader-core';
|
|
2
|
-
export declare const isBrowser: boolean;
|
|
3
|
-
export declare type ComponentLookupSpec = string | {
|
|
4
|
-
name: string;
|
|
5
|
-
projectId?: string;
|
|
6
|
-
isCode?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare function useForceUpdate(): () => void;
|
|
9
|
-
export declare function useStableLookupSpec(spec: ComponentLookupSpec): ComponentLookupSpec;
|
|
10
|
-
export declare function useStableLookupSpecs(...specs: ComponentLookupSpec[]): ComponentLookupSpec[];
|
|
11
|
-
export declare function useIsMounted(): () => boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Check if `lookup` resolves to `pagePath`. If it's a match, return an object
|
|
14
|
-
* containing path params; otherwise, returns false.
|
|
15
|
-
*
|
|
16
|
-
* For example,
|
|
17
|
-
* - `matchesPagePath("/hello/[name]", "/hello/world")` -> `{params: {name:
|
|
18
|
-
* "world"}}`
|
|
19
|
-
* - `matchesPagePath("/hello/[name]", "/")` -> `false`
|
|
20
|
-
* - `matchesPagePath("/", "")` -> `{params: {}}`
|
|
21
|
-
*/
|
|
22
|
-
export declare function matchesPagePath(pagePath: string, lookup: string): {
|
|
23
|
-
params: Record<string, string>;
|
|
24
|
-
} | false;
|
|
25
|
-
export declare function isDynamicPagePath(path: string): boolean;
|
|
26
|
-
export declare function getCompMetas(metas: ComponentMeta[], lookup: ComponentLookupSpec): (ComponentMeta & {
|
|
27
|
-
params?: Record<string, string> | undefined;
|
|
28
|
-
})[];
|
|
29
|
-
export declare function getLookupSpecName(lookup: ComponentLookupSpec): string;
|
|
30
|
-
export declare function uniq<T>(elements: T[]): T[];
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Split } from '@plasmicapp/loader-core';
|
|
2
|
-
import type { GlobalVariantSpec } from './PlasmicRootProvider';
|
|
3
|
-
export declare function getPlasmicCookieValues(): {
|
|
4
|
-
[k: string]: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function updatePlasmicCookieValue(key: string, value: string): void;
|
|
7
|
-
export declare function ensureVariationCookies(variation?: Record<string, string>): void;
|
|
8
|
-
export declare const getGlobalVariantsFromSplits: (splits: Split[], variation: Record<string, string>) => GlobalVariantSpec[];
|
|
9
|
-
export declare const mergeGlobalVariantsSpec: (target: GlobalVariantSpec[], from: GlobalVariantSpec[]) => GlobalVariantSpec[];
|