unframer 2.6.6 → 2.7.0
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/exporter.d.ts +16 -4
- package/dist/exporter.d.ts.map +1 -1
- package/dist/exporter.js +144 -47
- 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 +1 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +7 -0
- 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/exporter.d.ts +16 -4
- package/esm/exporter.d.ts.map +1 -1
- package/esm/exporter.js +143 -48
- 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 +1 -0
- package/esm/utils.d.ts.map +1 -1
- package/esm/utils.js +6 -0
- package/esm/utils.js.map +1 -1
- package/package.json +7 -5
- package/src/cli.tsx +63 -57
- package/src/css.ts +1 -1
- package/src/exporter.ts +179 -55
- package/src/framer.js +72 -19
- package/src/utils.ts +9 -0
package/src/framer.js
CHANGED
|
@@ -15349,7 +15349,7 @@ function steps(numSteps, direction = 'end',) {
|
|
|
15349
15349
|
};
|
|
15350
15350
|
}
|
|
15351
15351
|
|
|
15352
|
-
// https :https://app.framerstatic.com/framer.
|
|
15352
|
+
// https :https://app.framerstatic.com/framer.7SGKTLCE.mjs
|
|
15353
15353
|
init_chunk_QLPHEVXG();
|
|
15354
15354
|
import React4 from 'react';
|
|
15355
15355
|
import { startTransition as startTransition2, } from 'react';
|
|
@@ -18651,6 +18651,7 @@ function Router({
|
|
|
18651
18651
|
locales = EMPTY_ARRAY,
|
|
18652
18652
|
preserveQueryParams = false,
|
|
18653
18653
|
enableAsyncURLUpdates = false,
|
|
18654
|
+
LayoutTemplate,
|
|
18654
18655
|
},) {
|
|
18655
18656
|
useMarkRouterEffects();
|
|
18656
18657
|
useReplaceInitialState({
|
|
@@ -18879,14 +18880,27 @@ function Router({
|
|
|
18879
18880
|
notFoundPage,
|
|
18880
18881
|
defaultPageStyle,
|
|
18881
18882
|
forceUpdateKey: dep,
|
|
18882
|
-
children:
|
|
18883
|
-
|
|
18884
|
-
|
|
18885
|
-
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
|
|
18883
|
+
children: jsx(WithLayoutTemplate, {
|
|
18884
|
+
LayoutTemplate,
|
|
18885
|
+
routeId: currentRouteId,
|
|
18886
|
+
children: jsxs(Fragment, {
|
|
18887
|
+
children: [
|
|
18888
|
+
jsx(MarkSuspenseEffects.Start, {},),
|
|
18889
|
+
pageExistsInCurrentLocale
|
|
18890
|
+
? renderPage(
|
|
18891
|
+
current.page,
|
|
18892
|
+
LayoutTemplate
|
|
18893
|
+
? {
|
|
18894
|
+
...defaultPageStyle,
|
|
18895
|
+
display: 'content',
|
|
18896
|
+
}
|
|
18897
|
+
: defaultPageStyle,
|
|
18898
|
+
)
|
|
18899
|
+
: // LAYOUT_TEMPLATE @TODO: display: content for not found page?
|
|
18900
|
+
notFoundPage && renderPage(notFoundPage, defaultPageStyle,),
|
|
18901
|
+
],
|
|
18902
|
+
}, remountKey,),
|
|
18903
|
+
},),
|
|
18890
18904
|
},),
|
|
18891
18905
|
jsx(TurnOnReactEventHandling, {},),
|
|
18892
18906
|
jsx(MarkSuspenseEffects.End, {},),
|
|
@@ -18895,6 +18909,17 @@ function Router({
|
|
|
18895
18909
|
},),
|
|
18896
18910
|
},);
|
|
18897
18911
|
}
|
|
18912
|
+
function WithLayoutTemplate({
|
|
18913
|
+
LayoutTemplate,
|
|
18914
|
+
routeId,
|
|
18915
|
+
children,
|
|
18916
|
+
},) {
|
|
18917
|
+
if (!LayoutTemplate) return children;
|
|
18918
|
+
return jsx(LayoutTemplate, {
|
|
18919
|
+
routeId,
|
|
18920
|
+
children,
|
|
18921
|
+
},);
|
|
18922
|
+
}
|
|
18898
18923
|
function scrollElementIntoView(element, smoothScroll,) {
|
|
18899
18924
|
const scrollIntoViewOptions = smoothScroll
|
|
18900
18925
|
? {
|
|
@@ -36218,9 +36243,7 @@ function createHook(forwardedRef,) {
|
|
|
36218
36243
|
let preventNextCall = false;
|
|
36219
36244
|
function cloneChildrenWithPropsAndRef(children, props,) {
|
|
36220
36245
|
if (preventNextCall) {
|
|
36221
|
-
|
|
36222
|
-
'useCloneChildrenWithPropsAndRef: You should not call cloneChildrenWithPropsAndRef more than once during the render cycle.',
|
|
36223
|
-
);
|
|
36246
|
+
;
|
|
36224
36247
|
}
|
|
36225
36248
|
preventNextCall = true;
|
|
36226
36249
|
if (React2.Children.count(children,) > 1 && forwardedRef) {
|
|
@@ -42137,6 +42160,18 @@ var Ordering = class {
|
|
|
42137
42160
|
if (this.length !== other.length) return false;
|
|
42138
42161
|
return this.getHash() === other.getHash();
|
|
42139
42162
|
}
|
|
42163
|
+
providedByFields(fields,) {
|
|
42164
|
+
for (
|
|
42165
|
+
const {
|
|
42166
|
+
field,
|
|
42167
|
+
} of this.fields
|
|
42168
|
+
) {
|
|
42169
|
+
if (fields.has(field,)) continue;
|
|
42170
|
+
if (field.name === VIRTUAL_INDEX_FIELD) continue;
|
|
42171
|
+
return false;
|
|
42172
|
+
}
|
|
42173
|
+
return true;
|
|
42174
|
+
}
|
|
42140
42175
|
};
|
|
42141
42176
|
var Scope = class {
|
|
42142
42177
|
constructor(parent,) {
|
|
@@ -44740,13 +44775,21 @@ var Normalizer = class {
|
|
|
44740
44775
|
return this.newRelationalLeftJoin(right, left, constraint,);
|
|
44741
44776
|
}
|
|
44742
44777
|
newRelationalFilter(input, predicate,) {
|
|
44743
|
-
if (
|
|
44744
|
-
|
|
44745
|
-
|
|
44778
|
+
if (
|
|
44779
|
+
input instanceof RelationalLeftJoin &&
|
|
44780
|
+
// Check that the predicate doesn't depend on any joined field.
|
|
44781
|
+
predicate.referencedFields.subsetOf(input.leftGroup.relational.outputFields,)
|
|
44782
|
+
) {
|
|
44783
|
+
const pushedFilter = this.newRelationalFilter(input.left, predicate,);
|
|
44784
|
+
return this.newRelationalLeftJoin(pushedFilter, input.right, input.constraint,);
|
|
44746
44785
|
}
|
|
44747
|
-
if (
|
|
44748
|
-
|
|
44749
|
-
|
|
44786
|
+
if (
|
|
44787
|
+
input instanceof RelationalRightJoin &&
|
|
44788
|
+
// Check that the predicate doesn't depend on any joined field.
|
|
44789
|
+
predicate.referencedFields.subsetOf(input.rightGroup.relational.outputFields,)
|
|
44790
|
+
) {
|
|
44791
|
+
const pushedFilter = this.newRelationalFilter(input.right, predicate,);
|
|
44792
|
+
return this.newRelationalLeftJoin(input.left, pushedFilter, input.constraint,);
|
|
44750
44793
|
}
|
|
44751
44794
|
const node = new RelationalFilter(input, predicate,);
|
|
44752
44795
|
return this.finishRelational(node,);
|
|
@@ -44756,6 +44799,16 @@ var Normalizer = class {
|
|
|
44756
44799
|
return this.finishRelational(node,);
|
|
44757
44800
|
}
|
|
44758
44801
|
newRelationalLimit(input, limit, ordering,) {
|
|
44802
|
+
if (
|
|
44803
|
+
input instanceof RelationalProject &&
|
|
44804
|
+
// Check that the limit doesn't depend on any projected field.
|
|
44805
|
+
limit.referencedFields.subsetOf(input.inputGroup.relational.outputFields,) &&
|
|
44806
|
+
// Check that the ordering doesn't depend on any projected field.
|
|
44807
|
+
ordering.providedByFields(input.inputGroup.relational.outputFields,)
|
|
44808
|
+
) {
|
|
44809
|
+
const pushedLimit = this.newRelationalLimit(input.input, limit, ordering,);
|
|
44810
|
+
return this.newRelationalProject(pushedLimit, input.projections, input.passthrough,);
|
|
44811
|
+
}
|
|
44759
44812
|
const node = new RelationalLimit(input, limit, ordering,);
|
|
44760
44813
|
return this.finishRelational(node,);
|
|
44761
44814
|
}
|
|
@@ -53073,7 +53126,7 @@ var package_default = {
|
|
|
53073
53126
|
react: '^18.2.0',
|
|
53074
53127
|
'react-dom': '^18.2.0',
|
|
53075
53128
|
semver: '^7.5.2',
|
|
53076
|
-
typescript: '^5.
|
|
53129
|
+
typescript: '^5.7.2',
|
|
53077
53130
|
yargs: '^17.6.2',
|
|
53078
53131
|
},
|
|
53079
53132
|
peerDependencies: {
|
package/src/utils.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import pico from 'picocolors'
|
|
2
2
|
|
|
3
|
+
import { marked } from 'marked'
|
|
4
|
+
import { markedTerminal } from 'marked-terminal'
|
|
5
|
+
|
|
6
|
+
marked.use(markedTerminal())
|
|
7
|
+
|
|
8
|
+
export function terminalMarkdown(markdown: string) {
|
|
9
|
+
return marked(markdown)
|
|
10
|
+
}
|
|
11
|
+
|
|
3
12
|
const prefix = '[unframer]'
|
|
4
13
|
export const logger = {
|
|
5
14
|
log(...args) {
|