Skip to content

Commit

Permalink
change type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
CarelessCourage committed Apr 30, 2024
1 parent 7454776 commit ffc4a34
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/core/engine/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UmbraScheme, UmbraSettings } from './types'
import type { UmbraScheme, UmbraSettings } from './types'

export const defaultSettings: UmbraSettings = {
power: 0.15,
Expand Down
5 changes: 3 additions & 2 deletions packages/core/engine/generator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { colord, Colord } from 'colord'
import { UmbraAdjusted, UmbraScheme, Accent } from './types'
import { colord } from 'colord'
import type { Colord } from 'colord'
import type { UmbraAdjusted, UmbraScheme, Accent } from './types'
import { pickContrast, colorMix } from './primitives/color'
import { insertColorIntoRange, nextAccent, getStrings } from './primitives/utils'

Expand Down
3 changes: 2 additions & 1 deletion packages/core/engine/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { colord } from 'colord'
import { defaultSettings, defaultScheme } from './defaults'
import type { UmbraInput, UmbraScheme, UmbraRange, UmbraSettings } from './types'

import { format, Formater, UmbraOutputs, AttachProps } from './primitives/format'
import { format } from './primitives/format'
import type { Formater, UmbraOutputs, AttachProps } from './primitives/format'
import { inverse, isDark } from './primitives/scheme'
import { getReadable } from './primitives/color'
import { umbraGenerate } from './generator'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/engine/primitives/attach.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FlattenColor, UmbraOutputs } from './format'
import type { FlattenColor, UmbraOutputs } from './format'

//Why aliases? 2 reasons:
//1 - People seem to be better at understanding direct instructions rather than logic.
Expand Down
5 changes: 3 additions & 2 deletions packages/core/engine/primitives/color.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { colord, Colord, extend } from 'colord'
import { colord, extend } from 'colord'
import type { Colord } from 'colord'
import mixPlugin from 'colord/plugins/mix'
import { APCAcontrast, sRGBtoY } from 'apca-w3'
import { UmbraAdjusted } from '../types'
import type { UmbraAdjusted } from '../types'
import { defaultSettings } from '../defaults'

extend([mixPlugin])
Expand Down
7 changes: 4 additions & 3 deletions packages/core/engine/primitives/format.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Colord } from 'colord'
import type { Colord } from 'colord'
import { umbra } from '../..'
import { UmbraRange, FormatedRange, UmbraInput } from '../types'
import { attach, Alias } from './attach'
import type { UmbraRange, FormatedRange, UmbraInput } from '../types'
import { attach } from './attach'
import type { Alias } from './attach'

export type Formater = (color: Colord) => string

Expand Down
3 changes: 2 additions & 1 deletion packages/core/engine/primitives/scheme.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { colord, Colord } from 'colord'
import { colord } from 'colord'
import type { Colord } from 'colord'
import type { UmbraScheme, UmbraAdjusted } from '../types'
import { increaseContrastUntil, getReadability, getReadable, mostReadable } from './color'

Expand Down
5 changes: 3 additions & 2 deletions packages/core/engine/primitives/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { colord, Colord } from 'colord'
import { UmbraScheme, UmbraSettings } from '../types'
import { colord } from 'colord'
import type { Colord } from 'colord'
import type { UmbraScheme, UmbraSettings } from '../types'
import { getReadability } from './color'
import { defaultSettings } from '../defaults'

Expand Down
7 changes: 5 additions & 2 deletions packages/core/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { umbra, umbraHydrate, Umbra } from './engine/index'
import { umbra, umbraHydrate } from './engine/index'
import type { Umbra } from './engine/index'
import { umbraGenerate } from './engine/generator'
import { randomScheme } from './engine/primitives/utils'
import { format, FlattenColor, Formater, UmbraOutputs, hex, rgb } from './engine/primitives/format'
import { format, hex, rgb } from './engine/primitives/format'
import type { FlattenColor, Formater, UmbraOutputs } from './engine/primitives/format'

import { attach } from './engine/primitives/attach'
import { mostReadable, colorMix } from './engine/primitives/color'
import type {
Expand Down
2 changes: 1 addition & 1 deletion packages/playground/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import UmbraRange from './components/UmbraRange.vue'
import LabelsGroups from './components/ToneLabels.vue'
import ActionLabels from './components/ActionLabels.vue'
import PlayGround from './components/PlayGround.vue'
import { DyePicker } from '@umbrajs/dye'
import type { DyePicker } from '@umbrajs/dye' //TODO: Fix this - type is wrong
import '@umbrajs/dye/dist/style.css'
import { blue, blueDark, red, redDark, yellow, yellowDark } from '@radix-ui/colors'
Expand Down

0 comments on commit ffc4a34

Please sign in to comment.