Skip to content

fix #319

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

Merged
merged 3 commits into from
Apr 5, 2025
Merged

fix #319

Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"eslint.workingDirectories": ["./", "./codex-ui"],
"eslint.workingDirectories": ["./", "./@codexteam/ui"],

// Enable the ESlint flat config support
"eslint.experimental.useFlatConfig": true,
Expand Down
8 changes: 4 additions & 4 deletions @codexteam/ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Design System forged in the fires of open-source development
## Access Vue components

```ts
import { Button, Input, Heading } from 'codex-ui/vue';
import { Button, Input, Heading } from '@codexteam/ui/vue';
```

```vue
Expand All @@ -28,23 +28,23 @@ Add the following "path" to the "tsconfig.json"
{
"compilerOptions": {
"paths": {
"codex-ui/vue": ["../codex-ui/dist/types/vue/index.d.ts"],
"@codexteam/ui/vue": ["../@codexteam/ui/dist/types/vue/index.d.ts"],
}
},
}

```

## Build Design System
Build the design system to be able to use the codex-ui/styles import
Build the design system to be able to use the @codexteam/ui/styles import

```
yarn build
```

## Access CSS variables

1. Import `codex-ui/styles` somewhere in App
1. Import `@codexteam/ui/styles` somewhere in App
2. Use variable in CSS, e.g `var(--ui-color)`

## Using Typography
Expand Down
2 changes: 1 addition & 1 deletion @codexteam/ui/dev/pages/components/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
placeholder="Write something or press / to select a tool"
first-block-placeholder="Untitled"
autofocus
:inline-toolbar="true"
:inlineToolbar="true"
/>
</template>

Expand Down
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<script lang="ts" setup>
import AppNavbar from '@/presentation/components/app-navbar/AppNavbar.vue';
import { onErrorCaptured } from 'vue';
import { useTheme, Popover, Popup } from 'codex-ui/vue';
import { useTheme, Popover, Popup } from '@codexteam/ui/vue';
import useAuthRequired from '@/application/services/useAuthRequired';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/app-navbar/AppNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<script lang="ts" setup>
import { IconPlus } from '@codexteam/icons';
import { Tabbar, TabParams, Navbar } from 'codex-ui/vue';
import { Tabbar, TabParams, Navbar } from '@codexteam/ui/vue';
import Button from '@/presentation/components/button/Button.vue';
import { Logo } from '@/presentation/components/pictures';
import { useAppState } from '@/application/services/useAppState';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import { EditorToolWithUserBinding } from '@/domain/entities/EditorTool';
import { useUserSettings } from '@/application/services/useUserSettings';
import { useI18n } from 'vue-i18n';
import { computed, ref } from 'vue';
import { Button, Card } from 'codex-ui/vue';
import { Button, Card } from '@codexteam/ui/vue';

const { addTool, removeTool } = useUserSettings();

Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/note-list/NoteList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import type { Note } from '@/domain/entities/Note';
import { getTimeFromNow } from '@/infrastructure/utils/date';
import { getTitle } from '@/infrastructure/utils/note';
import { useI18n } from 'vue-i18n';
import { Card, CardSkeleton, Button } from 'codex-ui/vue';
import { Card, CardSkeleton, Button } from '@codexteam/ui/vue';

const {
noteList,
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/noteSettings/InviteLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { computed, defineProps, ref } from 'vue';
import useNoteSettings from '@/application/services/useNoteSettings';
import type { NoteId } from '@/domain/entities/Note';
import { useI18n } from 'vue-i18n';
import { Button, Row, Section } from 'codex-ui/vue';
import { Button, Row, Section } from '@codexteam/ui/vue';

const { t } = useI18n();

Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/pageHeading/PageHeading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>

<script setup lang="ts">
import { Heading } from 'codex-ui/vue';
import { Heading } from '@codexteam/ui/vue';
</script>

<style scoped lang="postcss">
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/team/RoleSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Note, NoteId } from '@/domain/entities/Note.ts';
import { computed, ref, watch } from 'vue';
import useNoteSettings from '@/application/services/useNoteSettings.ts';
import { useAppState } from '@/application/services/useAppState';
import { ContextMenuItem, DefaultItem, Select } from 'codex-ui/vue';
import { ContextMenuItem, DefaultItem, Select } from '@codexteam/ui/vue';
import useNote from '@/application/services/useNote.ts';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/team/Team.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
import { computed } from 'vue';
import { Team, MemberRole } from '@/domain/entities/Team';
import { Note, NoteId } from '@/domain/entities/Note';
import { Section, Row, Avatar } from 'codex-ui/vue';
import { Section, Row, Avatar } from '@codexteam/ui/vue';
import RoleSelect from './RoleSelect.vue';
import { useI18n } from 'vue-i18n';
import useNote from '@/application/services/useNote.ts';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/components/theme/ThemeButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { IconReplace } from '@codexteam/icons';
import { useI18n } from 'vue-i18n';
import Button from '@/presentation/components/button/Button.vue';
import { useTheme, ColorScheme } from 'codex-ui/vue';
import { useTheme, ColorScheme } from '@codexteam/ui/vue';

const { t } = useI18n();
const { colorScheme, setColorScheme } = useTheme();
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/AuthorizationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import useAuth from '@/application/services/useAuth';
import { useI18n } from 'vue-i18n';
import { watch } from 'vue';
import { useRouter } from 'vue-router';
import { Button } from 'codex-ui/vue';
import { Button } from '@codexteam/ui/vue';

const { user } = useAppState();
const { showGoogleAuthPopup } = useAuth();
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</template>

<script setup lang="ts">
import { Heading, Container, Row, Avatar, Button, PageBlock } from 'codex-ui/vue';
import { Heading, Container, Row, Avatar, Button, PageBlock } from '@codexteam/ui/vue';
import useNoteHistory from '@/application/services/useNoteHistory';
import useNavbar from '@/application/services/useNavbar';
import useNote from '@/application/services/useNote';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/HistoryVersion.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<script lang="ts" setup>
import { ref, toRef, watch } from 'vue';
import { Editor, Button, Avatar, PageBlock } from 'codex-ui/vue';
import { Editor, Button, Avatar, PageBlock } from '@codexteam/ui/vue';
import NoteHeader from '@/presentation/components/note-header/NoteHeader.vue';
import useHistory from '@/application/services/useNoteHistory';
import { useNoteEditor } from '@/application/services/useNoteEditor';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import { useHead } from 'unhead';
import { useI18n } from 'vue-i18n';
import { useAppState } from '@/application/services/useAppState';
import { Container, Row, Button, Heading, PageBlock } from 'codex-ui/vue';
import { Container, Row, Button, Heading, PageBlock } from '@codexteam/ui/vue';
import Hammer from '../components/pictures/Hammer.vue';
import NoteList from '@/presentation/components/note-list/NoteList.vue';
import useAuth from '@/application/services/useAuth';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/Note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@

<script lang="ts" setup>
import { computed, ref, toRef, watch } from 'vue';
import { Button, Editor, type VerticalMenuItem, VerticalMenu, PageBlock } from 'codex-ui/vue';
import { Button, Editor, type VerticalMenuItem, VerticalMenu, PageBlock } from '@codexteam/ui/vue';
import useNote from '@/application/services/useNote';
import { useRoute, useRouter } from 'vue-router';
import { NoteContent } from '@/domain/entities/Note';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/NoteSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ import { useI18n } from 'vue-i18n';
import { computed, ref, onMounted, watch } from 'vue';
import { useDebounceFn } from '@vueuse/core';
import Team from '@/presentation/components/team/Team.vue';
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card, PageBlock } from 'codex-ui/vue';
import { Section, Row, Switch, Button, Heading, Fieldset, Input, Card, PageBlock } from '@codexteam/ui/vue';
import { getTitle } from '@/infrastructure/utils/note';
import { getTimeFromNow } from '@/infrastructure/utils/date';
import InviteLink from '@/presentation/components/noteSettings/InviteLink.vue';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@

<script lang="ts" setup>
import { useI18n } from 'vue-i18n';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, LightColorShemeIcon, DarkColorShemeIcon, Container, Input, PageBlock } from 'codex-ui/vue';
import { Button, Fieldset, Section, Row, Heading, Card, useTheme, Theme, ColorScheme, ThemePreview, Icon, LightColorShemeIcon, DarkColorShemeIcon, Container, Input, PageBlock } from '@codexteam/ui/vue';
import { Hammer } from '@/presentation/components/pictures';
import { useRouter } from 'vue-router';
import useAuth from '@/application/services/useAuth';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/marketplace/AddTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

<script setup lang="ts">
import useMarketplace from '@/application/services/useMarketplace';
import { Section, Input, Button, Card, Fieldset } from 'codex-ui/vue';
import { Section, Input, Button, Card, Fieldset } from '@codexteam/ui/vue';
import PageHeading from '@/presentation/components/pageHeading/PageHeading.vue';
import { ref } from 'vue';
import { useRouter } from 'vue-router';
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/pages/marketplace/MarketplacePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</template>

<script lang="ts" setup>
import { VerticalMenu, type VerticalMenuItem, PageBlock } from 'codex-ui/vue';
import { VerticalMenu, type VerticalMenuItem, PageBlock } from '@codexteam/ui/vue';
import { computed, Ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';

Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@/domain": ["domain"],
"@/application/*": ["application/*"],
"@/application": ["application"],
"codex-ui/vue": ["../@codexteam/ui/dist/types/vue/index.d.ts"]
"@codexteam/ui/vue": ["../@codexteam/ui/dist/types/vue/index.d.ts"]
}
},
}
5 changes: 0 additions & 5 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd());

return {
build: {
rollupOptions: {
external: ['codex-ui/vue'],
},
},
plugins: [
vue(),
hawkVitePlugin({
Expand Down
Loading