unframer 2.6.6 → 2.7.1
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/README.md +9 -46
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +49 -44
- package/dist/cli.js.map +1 -1
- package/dist/css.js +1 -1
- package/dist/css.js.map +1 -1
- package/dist/esbuild.d.ts.map +1 -1
- package/dist/esbuild.js +7 -0
- package/dist/esbuild.js.map +1 -1
- package/dist/exporter.d.ts +16 -4
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +209 -49
- package/dist/exporter.js.map +1 -1
- package/dist/framer.d.ts.map +1 -1
- package/dist/framer.js +55 -19
- package/dist/framer.js.map +1 -1
- package/dist/utils.d.ts +2 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +14 -1
- package/dist/utils.js.map +1 -1
- package/esm/cli.d.ts.map +1 -1
- package/esm/cli.js +49 -44
- package/esm/cli.js.map +1 -1
- package/esm/css.js +1 -1
- package/esm/css.js.map +1 -1
- package/esm/esbuild.d.ts.map +1 -1
- package/esm/esbuild.js +7 -0
- package/esm/esbuild.js.map +1 -1
- package/esm/exporter.d.ts +16 -4
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +208 -50
- package/esm/exporter.js.map +1 -1
- package/esm/framer.d.ts.map +1 -1
- package/esm/framer.js +55 -19
- package/esm/framer.js.map +1 -1
- package/esm/utils.d.ts +2 -0
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +12 -0
- package/esm/utils.js.map +1 -1
- package/package.json +8 -5
- package/src/cli.tsx +63 -57
- package/src/css.ts +1 -1
- package/src/esbuild.ts +10 -1
- package/src/exporter.ts +266 -57
- package/src/framer.js +72 -19
- package/src/utils.ts +17 -0
package/esm/framer.js
CHANGED
|
@@ -14325,7 +14325,7 @@ function steps(numSteps, direction = 'end') {
|
|
|
14325
14325
|
return clamp(0, 1, rounded / numSteps);
|
|
14326
14326
|
};
|
|
14327
14327
|
}
|
|
14328
|
-
// https :https://app.framerstatic.com/framer.
|
|
14328
|
+
// https :https://app.framerstatic.com/framer.7SGKTLCE.mjs
|
|
14329
14329
|
init_chunk_QLPHEVXG();
|
|
14330
14330
|
import React4 from 'react';
|
|
14331
14331
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -17550,7 +17550,7 @@ function useNavigationTransition(enableAsyncURLUpdates) {
|
|
|
17550
17550
|
});
|
|
17551
17551
|
}), [enableAsyncURLUpdates, monitorNextPaintAfterRender, startNativeSpinner,]);
|
|
17552
17552
|
}
|
|
17553
|
-
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, enableAsyncURLUpdates = false, }) {
|
|
17553
|
+
function Router({ defaultPageStyle, disableHistory, initialPathVariables, initialRoute, notFoundPage, collectionUtils, routes, initialLocaleId, locales = EMPTY_ARRAY, preserveQueryParams = false, enableAsyncURLUpdates = false, LayoutTemplate, }) {
|
|
17554
17554
|
useMarkRouterEffects();
|
|
17555
17555
|
useReplaceInitialState({
|
|
17556
17556
|
disabled: disableHistory,
|
|
@@ -17752,14 +17752,20 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
17752
17752
|
notFoundPage,
|
|
17753
17753
|
defaultPageStyle,
|
|
17754
17754
|
forceUpdateKey: dep,
|
|
17755
|
-
children:
|
|
17756
|
-
|
|
17757
|
-
|
|
17758
|
-
|
|
17759
|
-
|
|
17760
|
-
|
|
17761
|
-
|
|
17762
|
-
|
|
17755
|
+
children: jsx(WithLayoutTemplate, {
|
|
17756
|
+
LayoutTemplate,
|
|
17757
|
+
routeId: currentRouteId,
|
|
17758
|
+
children: jsxs(Fragment, {
|
|
17759
|
+
children: [
|
|
17760
|
+
jsx(MarkSuspenseEffects.Start, {}),
|
|
17761
|
+
pageExistsInCurrentLocale
|
|
17762
|
+
? renderPage(current.page, LayoutTemplate
|
|
17763
|
+
? Object.assign(Object.assign({}, defaultPageStyle), { display: 'content' }) : defaultPageStyle)
|
|
17764
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
17765
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle),
|
|
17766
|
+
],
|
|
17767
|
+
}, remountKey),
|
|
17768
|
+
}),
|
|
17763
17769
|
}),
|
|
17764
17770
|
jsx(TurnOnReactEventHandling, {}),
|
|
17765
17771
|
jsx(MarkSuspenseEffects.End, {}),
|
|
@@ -17768,6 +17774,14 @@ function Router({ defaultPageStyle, disableHistory, initialPathVariables, initia
|
|
|
17768
17774
|
}),
|
|
17769
17775
|
});
|
|
17770
17776
|
}
|
|
17777
|
+
function WithLayoutTemplate({ LayoutTemplate, routeId, children, }) {
|
|
17778
|
+
if (!LayoutTemplate)
|
|
17779
|
+
return children;
|
|
17780
|
+
return jsx(LayoutTemplate, {
|
|
17781
|
+
routeId,
|
|
17782
|
+
children,
|
|
17783
|
+
});
|
|
17784
|
+
}
|
|
17771
17785
|
function scrollElementIntoView(element, smoothScroll) {
|
|
17772
17786
|
const scrollIntoViewOptions = smoothScroll
|
|
17773
17787
|
? {
|
|
@@ -34081,7 +34095,7 @@ function createHook(forwardedRef) {
|
|
|
34081
34095
|
let preventNextCall = false;
|
|
34082
34096
|
function cloneChildrenWithPropsAndRef(children, props) {
|
|
34083
34097
|
if (preventNextCall) {
|
|
34084
|
-
|
|
34098
|
+
;
|
|
34085
34099
|
}
|
|
34086
34100
|
preventNextCall = true;
|
|
34087
34101
|
if (React2.Children.count(children) > 1 && forwardedRef) {
|
|
@@ -39844,6 +39858,16 @@ var Ordering = class {
|
|
|
39844
39858
|
return false;
|
|
39845
39859
|
return this.getHash() === other.getHash();
|
|
39846
39860
|
}
|
|
39861
|
+
providedByFields(fields) {
|
|
39862
|
+
for (const { field, } of this.fields) {
|
|
39863
|
+
if (fields.has(field))
|
|
39864
|
+
continue;
|
|
39865
|
+
if (field.name === VIRTUAL_INDEX_FIELD)
|
|
39866
|
+
continue;
|
|
39867
|
+
return false;
|
|
39868
|
+
}
|
|
39869
|
+
return true;
|
|
39870
|
+
}
|
|
39847
39871
|
};
|
|
39848
39872
|
var Scope = class {
|
|
39849
39873
|
constructor(parent) {
|
|
@@ -42349,13 +42373,17 @@ var Normalizer = class {
|
|
|
42349
42373
|
return this.newRelationalLeftJoin(right, left, constraint);
|
|
42350
42374
|
}
|
|
42351
42375
|
newRelationalFilter(input, predicate) {
|
|
42352
|
-
if (input instanceof RelationalLeftJoin &&
|
|
42353
|
-
|
|
42354
|
-
|
|
42355
|
-
|
|
42356
|
-
|
|
42357
|
-
|
|
42358
|
-
|
|
42376
|
+
if (input instanceof RelationalLeftJoin &&
|
|
42377
|
+
// Check that the predicate doesn't depend on any joined field.
|
|
42378
|
+
predicate.referencedFields.subsetOf(input.leftGroup.relational.outputFields)) {
|
|
42379
|
+
const pushedFilter = this.newRelationalFilter(input.left, predicate);
|
|
42380
|
+
return this.newRelationalLeftJoin(pushedFilter, input.right, input.constraint);
|
|
42381
|
+
}
|
|
42382
|
+
if (input instanceof RelationalRightJoin &&
|
|
42383
|
+
// Check that the predicate doesn't depend on any joined field.
|
|
42384
|
+
predicate.referencedFields.subsetOf(input.rightGroup.relational.outputFields)) {
|
|
42385
|
+
const pushedFilter = this.newRelationalFilter(input.right, predicate);
|
|
42386
|
+
return this.newRelationalLeftJoin(input.left, pushedFilter, input.constraint);
|
|
42359
42387
|
}
|
|
42360
42388
|
const node = new RelationalFilter(input, predicate);
|
|
42361
42389
|
return this.finishRelational(node);
|
|
@@ -42365,6 +42393,14 @@ var Normalizer = class {
|
|
|
42365
42393
|
return this.finishRelational(node);
|
|
42366
42394
|
}
|
|
42367
42395
|
newRelationalLimit(input, limit, ordering) {
|
|
42396
|
+
if (input instanceof RelationalProject &&
|
|
42397
|
+
// Check that the limit doesn't depend on any projected field.
|
|
42398
|
+
limit.referencedFields.subsetOf(input.inputGroup.relational.outputFields) &&
|
|
42399
|
+
// Check that the ordering doesn't depend on any projected field.
|
|
42400
|
+
ordering.providedByFields(input.inputGroup.relational.outputFields)) {
|
|
42401
|
+
const pushedLimit = this.newRelationalLimit(input.input, limit, ordering);
|
|
42402
|
+
return this.newRelationalProject(pushedLimit, input.projections, input.passthrough);
|
|
42403
|
+
}
|
|
42368
42404
|
const node = new RelationalLimit(input, limit, ordering);
|
|
42369
42405
|
return this.finishRelational(node);
|
|
42370
42406
|
}
|
|
@@ -49963,7 +49999,7 @@ var package_default = {
|
|
|
49963
49999
|
react: '^18.2.0',
|
|
49964
50000
|
'react-dom': '^18.2.0',
|
|
49965
50001
|
semver: '^7.5.2',
|
|
49966
|
-
typescript: '^5.
|
|
50002
|
+
typescript: '^5.7.2',
|
|
49967
50003
|
yargs: '^17.6.2',
|
|
49968
50004
|
},
|
|
49969
50005
|
peerDependencies: {
|