Skip to content

Commit

Permalink
New Framer Release
Browse files Browse the repository at this point in the history
  • Loading branch information
remorses authored and github-actions[bot] committed Oct 18, 2024
1 parent 8d88cb3 commit d36844d
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions unframer/src/framer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10500,7 +10500,7 @@ function steps(numSteps, direction = 'end',) {
};
}

// https :https://app.framerstatic.com/framer.7LTCXNJW.js
// https :https://app.framerstatic.com/framer.72PAIOGJ.js

import React4 from 'react';
import { startTransition as startTransition2, } from 'react';
Expand Down Expand Up @@ -31449,6 +31449,7 @@ var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
cache: cache2,
} = React4.useContext(StyleSheetContext,) ?? {};
if (!isBrowser2()) {
if (isFunction(escapedCSS,)) escapedCSS = escapedCSS(RenderTarget.current(),);
const concatenatedCSS = Array.isArray(escapedCSS,) ? escapedCSS.join('\n',) : escapedCSS;
return /* @__PURE__ */ jsxs(Fragment, {
children: [
Expand All @@ -31470,7 +31471,11 @@ var withCSS = (Component15, escapedCSS, componentSerializationId,) =>
}
React4.useInsertionEffect(() => {
if (componentSerializationId && componentsWithServerRenderedStyles.has(componentSerializationId,)) return;
const css2 = Array.isArray(escapedCSS,) ? escapedCSS : escapedCSS.split('\n',);
const css2 = isFunction(escapedCSS,)
? escapedCSS(RenderTarget.current(),)
: Array.isArray(escapedCSS,)
? escapedCSS
: escapedCSS.split('\n',);
css2.forEach((rule) => rule && injectCSSRule(rule, sheet, cache2,));
}, [],);
return /* @__PURE__ */ jsx(Component15, {
Expand Down Expand Up @@ -38837,23 +38842,24 @@ var EnforcerResolve = class extends EnforcerNode {
}
const collectionItems = yield Promise.all(
Array.from(collections,).map(async (collection) => {
const pointers = input.tuples.map((tuple) => {
const pointers = [];
for (const tuple of input.tuples) {
const pointer = tuple.getPointer(collection,);
assert(pointer, 'Pointer required to resolve field',);
return pointer;
},);
if (pointer) pointers.push(pointer,);
}
const items = await collection.data.resolveItems(pointers,);
assert(items.length === pointers.length, 'Invalid number of items',);
return [collection, items,];
},),
);
return input.map(input.fields, (tuple, index,) => {
return input.map(input.fields, (tuple) => {
const result = new Tuple();
result.merge(tuple,);
for (const [collection, items,] of collectionItems) {
const item = items[index];
assert(item, 'Item not found',);
const pointer = tuple.getPointer(collection,);
if (!pointer) continue;
const item = items.shift();
assert(item, 'Item not found',);
assert(item.pointer === pointer, 'Pointer mismatch',);
for (const field of collection.fields) {
const value = field.getValue(item,);
Expand Down Expand Up @@ -42735,6 +42741,8 @@ var GoogleFontSource = class {
source: this.name,
};
}
// CAUTION: This method has to be exactly the same as the one in fontStore. Because we are using the font selector to get open type features.
// https://github.com/framer/FramerStudio/blob/master/tools/font-metadata-extractor/src/utils/googleFonts.ts
static createSelector(family, variant,) {
return `${googleFontSelectorPrefix}${family}-${variant}`;
}
Expand Down

0 comments on commit d36844d

Please sign in to comment.