Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ utopia-js-component.tar.gz

utopia-api/dist
utopia-api/node_modules
utopia-api/package-lock.json

## Various settings
*.pbxuser
Expand Down
48 changes: 14 additions & 34 deletions utopia-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "utopia-api",
"version": "0.4.4",
"version": "0.5.1",
"description": "Utopia API",
"main": "src/index.ts",
"module": "dist/index.js",
Expand All @@ -21,8 +21,7 @@
"test": "jest",
"test-watch": "jest --watch",
"build": "tsc",
"watch": "tsc --watch",
"preinstall": "npx only-allow pnpm"
"watch": "tsc --watch"
},
"repository": {
"type": "git",
Expand All @@ -47,38 +46,19 @@
"license": "",
"homepage": "https://utopia.app",
"peerDependencies": {
"react": "18.1.0",
"react-dom": "18.1.0"
},
"dependencies": {
"@emotion/react": "11.1.2",
"@emotion/serialize": "1.0.2",
"@emotion/styled": "11.0.0",
"@emotion/styled-base": "11.0.0",
"uuid": "3.3.2"
"react": "^18.0.0",
"react-dom": "^18.0.0"
},
"devDependencies": {
"@babel/core": "7.14.6",
"@babel/preset-env": "7.14.7",
"@babel/preset-react": "7.14.5",
"@babel/preset-typescript": "7.14.5",
"@types/draft-js": "0.10.19",
"@types/jest": "27.0.2",
"@types/prettier": "^1.18.4",
"@types/react": "18.0.9",
"@types/react-dom": "18.0.3",
"@types/uuid": "3.4.5",
"babel-jest": "^27.2.4",
"csstype": "3.0.3",
"jest": "27.2.3",
"jest-environment-jsdom": "27.2.3",
"lint-staged": "^9.4.3",
"prettier": "2.0.5",
"typescript": "4.6.4"
},
"pnpm": {
"patchedDependencies": {
"@emotion/react@11.1.2": "patches/@emotion__react@11.1.2.patch"
}
"@babel/preset-env": "^7.24.5",
"@babel/preset-react": "^7.24.1",
"@babel/preset-typescript": "^7.24.1",
Comment on lines +53 to +56

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the ^ please

"@types/jest": "29.5.2",
"@types/react": "18.3.1",
"@types/react-dom": "18.3.0",
"jest": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"prettier": "3.2.5",
"typescript": "5.2.2"
}
}
12 changes: 2 additions & 10 deletions utopia-api/src/primitives/flex-views.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
/** @jsx jsx */
/** @jsxRuntime classic */
import type { Interpolation, Theme } from '@emotion/react'
import { jsx } from '@emotion/react'
import React from 'react'
import type { UtopiaComponentProps } from './common'
import { addEventHandlersToDivProps } from './common'

export interface FlexRowProps
extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
UtopiaComponentProps {
css: Interpolation<Theme>
}

export const FlexRow: React.FunctionComponent<FlexRowProps> = (props: FlexRowProps) => {
return (
<div
{...props}
// we use Emotion css prop here so that it is overwritable with both classNames and style props
css={[{ display: 'flex', flexDirection: 'row' }, props.css]}
style={{display: 'flex', flexDirection: 'row', ...props.style}}
>
{props.children}
</div>
Expand All @@ -31,8 +24,7 @@ export const FlexCol: React.FunctionComponent<FlexColProps> = (props: FlexColPro
return (
<div
{...props}
// we use Emotion css prop here so that it is overwritable with both classNames and style props
css={[{ display: 'flex', flexDirection: 'column' }, props.css]}
style={{display: 'flex', flexDirection: 'column', ...props.style}}
>
{props.children}
</div>
Expand Down
2 changes: 0 additions & 2 deletions utopia-api/src/primitives/group.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Interpolation, Theme } from '@emotion/react'
import React from 'react'
import type { UtopiaComponentProps } from './common'
import { addEventHandlersToDivProps } from './common'

export interface GroupProps
extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
Expand Down
2 changes: 0 additions & 2 deletions utopia-api/src/primitives/view.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import type { Interpolation, Theme } from '@emotion/react'
import React from 'react'
import type { UtopiaComponentProps } from './common'
import { addEventHandlersToDivProps } from './common'

export interface ViewProps
extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
UtopiaComponentProps {
css?: Interpolation<Theme>
}

export const View: React.FunctionComponent<ViewProps> = (props: ViewProps) => {
Expand Down
37 changes: 0 additions & 37 deletions utopia-api/src/tests/test-utils.tsx

This file was deleted.