Skip to content

Commit

Permalink
fix: add file extensions
Browse files Browse the repository at this point in the history
feat: deploy kits as npm packages
  • Loading branch information
bbohlender committed Mar 25, 2024
1 parent 2a28f5b commit c757bc9
Show file tree
Hide file tree
Showing 15 changed files with 150 additions and 133 deletions.
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"import/no-unresolved": "off",
"import/named": "off",
"import/namespace": "off",
"import/no-named-as-default-member": "off"
"import/no-named-as-default-member": "off",
"import/extensions": ["error", "ignorePackages"]
}
}
8 changes: 8 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,11 @@ jobs:
working-directory: ./packages/icons/lucide
run: pnpm publish --access public --no-git-checks --tag ${{ steps.gitversion.outputs.preReleaseLabel == '' && 'latest' || steps.gitversion.outputs.preReleaseLabel }}

- name: Deploy Uikit-Default Package
working-directory: ./packages/kits/default
run: pnpm publish --access public --no-git-checks --tag ${{ steps.gitversion.outputs.preReleaseLabel == '' && 'latest' || steps.gitversion.outputs.preReleaseLabel }}

- name: Deploy Uikit-Apfel Package
working-directory: ./packages/kits/apfel
run: pnpm publish --access public --no-git-checks --tag ${{ steps.gitversion.outputs.preReleaseLabel == '' && 'latest' || steps.gitversion.outputs.preReleaseLabel }}

6 changes: 6 additions & 0 deletions packages/kits/apfel/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../../.eslintrc",
"rules": {
"import/extensions": "off"
}
}
11 changes: 11 additions & 0 deletions packages/kits/apfel/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export * from './button'
export * from './card'
export * from './checkbox'
export * from './input'
export * from './list'
export * from './loading'
export * from './progress'
export * from './slider'
export * from './tab-bar'
export * from './tabs'
export * from './theme'
34 changes: 31 additions & 3 deletions packages/kits/apfel/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{
"name": "@react-three/uikit-apfel",
"description": "Apfel kit for @react-three/uikit",
"version": "0.0.0",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://github.com/pmndrs/uikit",
"author": "Bela Bohlender",
"keywords": [
"r3f",
"uikit",
"three.js",
"userinterface",
"react",
"flexbox",
"yoga",
"typescript",
"apfel"
],
"repository": {
"type": "git",
"url": "[email protected]:pmndrs/uikit.git"
},
"files": [
"dist"
],
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"check:prettier": "prettier --check .",
"check:eslint": "eslint '**/*.{tsx,ts}'",
"fix:prettier": "prettier --write .",
Expand All @@ -8,11 +34,13 @@
"devDependencies": {
"@preact/signals-core": "^1.5.1",
"@react-three/fiber": "^8.15.13",
"@react-three/uikit": "workspace:^",
"@react-three/uikit-lucide": "workspace:^",
"@types/react": "^18.2.47",
"@types/three": "^0.161.0",
"three": "^0.161.0"
},
"type": "module"
"type": "module",
"dependencies": {
"@react-three/uikit": "workspace:^",
"@react-three/uikit-lucide": "workspace:^"
}
}
99 changes: 0 additions & 99 deletions packages/kits/apfel/text-input.tsx

This file was deleted.

3 changes: 3 additions & 0 deletions packages/kits/apfel/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"declaration": true,
"skipLibCheck": true,
"jsx": "react"
}
}
6 changes: 6 additions & 0 deletions packages/kits/default/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "../../../.eslintrc",
"rules": {
"import/extensions": "off"
}
}
23 changes: 23 additions & 0 deletions packages/kits/default/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
export * from './accordion.js'
export * from './alert.js'
export * from './alert-dialog.js'
export * from './avatar.js'
export * from './badge.js'
export * from './button.js'
export * from './card.js'
export * from './checkbox.js'
export * from './dialog.js'
export * from './label.js'
export * from './pagination.js'
export * from './progress.js'
export * from './radio-group.js'
export * from './separator.js'
export * from './skeleton.js'
export * from './slider.js'
export * from './switch.js'
export * from './tabs.js'
export * from './toggle.js'
export * from './toggle-group.js'
export * from './tooltip.js'
export * from './input.js'
export * from './theme.js'
30 changes: 28 additions & 2 deletions packages/kits/default/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
{
"name": "@react-three/uikit-default",
"description": "Default (shadcn) kit for @react-three/uikit",
"version": "0.0.0",
"license": "SEE LICENSE IN LICENSE",
"homepage": "https://github.com/pmndrs/uikit",
"author": "Bela Bohlender",
"keywords": [
"r3f",
"uikit",
"three.js",
"userinterface",
"react",
"flexbox",
"yoga",
"typescript",
"shadcn"
],
"repository": {
"type": "git",
"url": "[email protected]:pmndrs/uikit.git"
},
"files": [
"dist"
],
"main": "dist/index.js",
"scripts": {
"build": "tsc",
"check:prettier": "prettier --check .",
"check:eslint": "eslint '**/*.{tsx,ts}'",
"fix:prettier": "prettier --write .",
Expand All @@ -8,14 +34,14 @@
"devDependencies": {
"@preact/signals-core": "^1.5.1",
"@react-three/fiber": "^8.15.13",
"@react-three/uikit": "workspace:^",
"@react-three/uikit-lucide": "workspace:^",
"@types/react": "^18.2.47",
"@types/three": "^0.161.0",
"three": "^0.161.0"
},
"type": "module",
"dependencies": {
"@react-three/uikit": "workspace:^",
"@react-three/uikit-lucide": "workspace:^",
"tunnel-rat": "^0.1.2"
}
}
3 changes: 3 additions & 0 deletions packages/kits/default/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"declaration": true,
"skipLibCheck": true,
"jsx": "react"
}
}
16 changes: 8 additions & 8 deletions packages/uikit/src/caret.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Signal, computed, effect, signal } from '@preact/signals-core'
import { Matrix4, Vector3Tuple } from 'three'
import { ClippingRect } from './clipping'
import { ElementType, OrderInfo, useOrderInfo } from './order'
import { GetInstancedPanelGroup, useGetInstancedPanelGroup, usePanelGroupDependencies } from './panel/react'
import { ClippingRect } from './clipping.js'
import { ElementType, OrderInfo, useOrderInfo } from './order.js'
import { GetInstancedPanelGroup, useGetInstancedPanelGroup, usePanelGroupDependencies } from './panel/react.js'
import { useEffect, useMemo } from 'react'
import { InstancedPanel } from './panel/instanced-panel'
import { Inset } from './flex'
import { ManagerCollection, PropertyTransformation } from './properties/utils'
import { useImmediateProperties } from './properties/immediate'
import { useBatchedProperties } from './properties/batched'
import { InstancedPanel } from './panel/instanced-panel.js'
import { Inset } from './flex/index.js'
import { ManagerCollection, PropertyTransformation } from './properties/utils.js'
import { useImmediateProperties } from './properties/immediate.js'
import { useBatchedProperties } from './properties/batched.js'

const noBorder = signal<Inset>([0, 0, 0, 0])

Expand Down
6 changes: 3 additions & 3 deletions packages/uikit/src/focus.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useMemo } from 'react'
import { WithClasses, useTraverseProperties } from './properties/default'
import { ManagerCollection, Properties } from './properties/utils'
import { createConditionalPropertyTranslator } from './utils'
import { WithClasses, useTraverseProperties } from './properties/default.js'
import { ManagerCollection, Properties } from './properties/utils.js'
import { createConditionalPropertyTranslator } from './utils.js'
import { Signal } from '@preact/signals-core'

export type WithFocus<T> = T & {
Expand Down
10 changes: 5 additions & 5 deletions packages/uikit/src/selection.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Signal, effect, signal } from '@preact/signals-core'
import { GetInstancedPanelGroup, useGetInstancedPanelGroup, usePanelGroupDependencies } from './panel/react'
import { GetInstancedPanelGroup, useGetInstancedPanelGroup, usePanelGroupDependencies } from './panel/react.js'
import { useEffect, useMemo } from 'react'
import { InstancedPanel } from './panel/instanced-panel'
import { InstancedPanel } from './panel/instanced-panel.js'
import { Matrix4, Vector2Tuple } from 'three'
import { ClippingRect } from './clipping'
import { ElementType, OrderInfo, useOrderInfo } from './order'
import { Inset } from './flex'
import { ClippingRect } from './clipping.js'
import { ElementType, OrderInfo, useOrderInfo } from './order.js'
import { Inset } from './flex/index.js'

const noBorder = signal<Inset>([0, 0, 0, 0])

Expand Down
25 changes: 13 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c757bc9

Please sign in to comment.