Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unistyles and use custome builder css #65

Merged
merged 32 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
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
5 changes: 5 additions & 0 deletions .changeset/chatty-experts-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crossed/styled': minor
---

add plugin
5 changes: 5 additions & 0 deletions .changeset/hungry-dolls-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@crossed/core': patch
---

remove helper
7 changes: 7 additions & 0 deletions .changeset/metal-geckos-run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@crossed/webpack': patch
'@crossed/loader': patch
'@crossed/styled': patch
---

some fix after first usage in external project
6 changes: 6 additions & 0 deletions .changeset/plenty-birds-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@crossed/styled': patch
'@crossed/core': patch
---

fix typescript error not pass props
32 changes: 32 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"mode": "pre",
"tag": "beta",
"initialVersions": {
"crossed-docs": "0.5.2",
"crossed-expo": "0.1.1",
"@crossed/build": "0.5.0",
"@crossed/core": "0.8.0",
"@crossed/loader": "0.1.0",
"@crossed/log": "0.1.0",
"@crossed/next-adapter": "0.5.1",
"@crossed/primitive": "1.7.0",
"@crossed/styled": "0.13.0",
"@crossed/test": "0.11.0",
"@crossed/ui": "0.9.0",
"@crossed/unicons": "0.6.0",
"@crossed/webpack": "1.0.0"
},
"changesets": [
"chatty-experts-collect",
"hungry-dolls-brake",
"lucky-bulldogs-rest",
"metal-geckos-run",
"perfect-points-laugh",
"pink-starfishes-swim",
"plenty-birds-collect",
"shiny-baboons-trade",
"strange-teachers-drive",
"tricky-ducks-rush",
"young-mayflies-watch"
]
}
6 changes: 6 additions & 0 deletions .changeset/young-mayflies-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@crossed/loader': patch
'@crossed/styled': patch
---

remove Theme plugin for add theme in core, delete withStyle, and createStyles return directly hooks
4 changes: 2 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./packages/*/tsconfig.json", "./apps/*/tsconfig.json"]
"project": ["./packages/*/tsconfig.test.json", "./packages/*/tsconfig.json", "./apps/*/tsconfig.json"]
},
"plugins": ["@typescript-eslint", "prettier", "license-header"],
"ignorePatterns": ["next-env.d.ts"]
"ignorePatterns": ["next-env.d.ts", "expo-env.d.ts", "lib"]
}
2 changes: 2 additions & 0 deletions .github/workflows/merge-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lock
- name: Build
run: pnpm build
- name: Linter
run: pnpm lint
- name: unit-test
Expand Down
73 changes: 73 additions & 0 deletions apps/documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,78 @@
# crossed-docs

## 0.6.0-beta.5

### Patch Changes

- Updated dependencies [63171a9]
- @crossed/styled@0.14.0-beta.5
- @crossed/ui@1.0.0-beta.5
- @crossed/unicons@1.0.0-beta.5
- @crossed/next-adapter@0.5.2-beta.5

## 0.6.0-beta.4

### Patch Changes

- Updated dependencies
- @crossed/styled@0.14.0-beta.4
- @crossed/core@0.8.1-beta.1
- @crossed/ui@1.0.0-beta.4
- @crossed/unicons@1.0.0-beta.4
- @crossed/primitive@1.7.1-beta.1
- @crossed/next-adapter@0.5.2-beta.4

## 0.6.0-beta.3

### Patch Changes

- Updated dependencies [7a7a589]
- @crossed/styled@0.14.0-beta.3
- @crossed/next-adapter@0.5.2-beta.3
- @crossed/ui@1.0.0-beta.3
- @crossed/unicons@1.0.0-beta.3

## 0.6.0-beta.2

### Patch Changes

- Updated dependencies
- @crossed/core@0.8.1-beta.0
- @crossed/primitive@1.7.1-beta.0
- @crossed/styled@0.14.0-beta.2
- @crossed/ui@1.0.0-beta.2
- @crossed/unicons@1.0.0-beta.2
- @crossed/next-adapter@0.5.2-beta.2

## 0.6.0-beta.1

### Patch Changes

- Updated dependencies
- @crossed/styled@0.14.0-beta.1
- @crossed/ui@1.0.0-beta.1
- @crossed/unicons@1.0.0-beta.1
- @crossed/next-adapter@0.5.2-beta.1

## 0.6.0-beta.0

### Minor Changes

- 7b48a2b: feat(theme): add theme colors and utils for apply variants based on colors

### Patch Changes

- Updated dependencies [d9f9372]
- Updated dependencies [31e0003]
- Updated dependencies [c7e44dc]
- Updated dependencies [7b48a2b]
- Updated dependencies [b7f88a7]
- Updated dependencies [8917db4]
- @crossed/styled@0.14.0-beta.0
- @crossed/ui@1.0.0-beta.0
- @crossed/unicons@1.0.0-beta.0
- @crossed/next-adapter@0.5.2-beta.0

## 0.5.2

### Patch Changes
Expand Down
6 changes: 6 additions & 0 deletions apps/documentation/license-header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Copyright (c) Paymium.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root of this projects source tree.
*/
39 changes: 16 additions & 23 deletions apps/documentation/next.config.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
const { withCrossed } = require('@crossed/next-adapter');

/** @type {import('next').NextConfig} */
const nextConfig = {
const nextConfig = withCrossed({
configPath: './src/style.config.ts',
level: "debug"
})({
output: 'export',
reactStrictMode: false,
transpilePackages: ['react-native', 'react-native-reanimated'],
// transpilePackages: ['react-native', 'react-native-reanimated'],
basePath: '/crossed',
webpack: (config, { webpack }) => {
config.resolve.alias = {
...config.resolve.alias,
'react-native$': 'react-native-web',
};

config.resolve.extensions = [
'.web.js',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
];

config.plugins.push(
new webpack.DefinePlugin({
__DEV__: JSON.stringify(process.env.NODE_ENV !== 'production'),
})
);
// webpack: (config, { webpack, isServer }) => {
// config.plugins.push(
// new webpack.DefinePlugin({
// __DEV__: JSON.stringify(process.env.NODE_ENV !== 'production'),
// })
// );

return config;
},
};
// return config;
// },
});

module.exports = nextConfig;
16 changes: 9 additions & 7 deletions apps/documentation/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
{
"name": "crossed-docs",
"version": "0.5.2",
"version": "0.6.0-beta.5",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"serve": "serve out",
"start": "next start",
"lint": "next lint",
"type-check": "tsc --noEmit"
},
"dependencies": {
"@babel/preset-react": "^7.23.3",
"@crossed/core": "workspace:^",
"@crossed/next-adapter": "workspace:^",
"@crossed/primitive": "workspace:^",
"@crossed/styled": "workspace:^",
"@crossed/ui": "workspace:^",
Expand All @@ -23,23 +25,23 @@
"next-translate": "^2.6.2",
"prism-react-renderer": "^2.3.1",
"raf": "^3.4.1",
"react": "^18",
"react": "^18.2.0",
"react-dom": "^18",
"react-i18next": "^14.0.0",
"react-live": "^4.1.5",
"react-native": "0.72.5",
"react-native": "0.73.5",
"react-native-reanimated": "^3.5.1",
"react-native-unistyles": "^2.0.0",
"react-native-web": "^0.19.10"
"react-native-web": "^0.19.10",
"serve": "^14.2.1"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react": "^18.2.64",
"@types/react-dom": "^18",
"@types/react-native": "^0.72.5",
"eslint": "^8",
"eslint-config-next": "14.0.4",
"next-translate-plugin": "^2.6.2",
"typescript": "^5"
"typescript": "^5.4.2"
}
}
Empty file.
23 changes: 15 additions & 8 deletions apps/documentation/src/app/(doc)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@

'use client';

import '@/style.config';
import { XBox } from '@crossed/ui';
import { styled } from '@crossed/styled';
import { createStyles } from '@crossed/styled';

const Container = styled(XBox, {
flex: 1,
width: '100%',
justifyContent: 'center',
paddingVertical: 15,
});
const styles = createStyles(() => ({
root: {
base: {
flex: 1,
width: '100%',
justifyContent: 'center',
paddingVertical: 15,
},
},
}));

export default Container;
export default (props) => {
return <XBox {...props} {...styles.root.rnw(props)} />;
};
Loading
Loading