-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 add TypeScript definitiosn for some missing addons
- Loading branch information
Showing
11 changed files
with
73 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface AmpAddon {} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface ArrayAddon {} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
import {CssLikeObject} from '../types/common'; | ||
|
||
export interface CacheAddon { | ||
cache(css: CssLikeObject): string; | ||
} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
import {CssLikeObject} from '../types/common'; | ||
|
||
export interface DsheetAddon { | ||
dsheet(map: object, block?: string): object; | ||
} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface ExtractAddon {} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
import {CssLikeObject} from '../types/common'; | ||
|
||
export interface GlobalAddon { | ||
global(css: CssLikeObject); | ||
} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
import {CssLikeObject} from '../types/common'; | ||
|
||
export interface GoogleFontAddon { | ||
googleFont(font: string, weights: number | string | (number | string)[], subsets: string | string[]); | ||
} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface HydrateAddon { | ||
hydrate(sh: HTMLStyleElement); | ||
} | ||
|
||
export function addon(nano: NanoRenderer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,3 @@ | ||
import {CreateNano} from './types/nano'; | ||
import {UnitsAddon} from './types/addon/units'; | ||
import {DruleAddon} from './types/addon/drule'; | ||
import {SheetAddon} from './types/addon/sheet'; | ||
import {AtomsAddon} from './types/addon/atoms'; | ||
import {EmmetAddon} from './types/addon/emmet'; | ||
import {SheetPreset} from './types/preset/sheet'; | ||
import {KeyframesAddon} from './types/addon/keyframes'; | ||
|
||
export * from './types/nano'; | ||
|
||
declare module 'nano-css' { | ||
export const create: CreateNano; | ||
} | ||
|
||
// Addons | ||
|
||
declare module 'nano-css/addon/rule' { | ||
export const addon: RuleAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/rdule' { | ||
export const addon: DruleAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/sheet' { | ||
export const addon: SheetAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/units' { | ||
export const addon: UnitsAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/atoms' { | ||
export const addon: AtomsAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/emmet' { | ||
export const addon: EmmetAddon; | ||
} | ||
|
||
declare module 'nano-css/addon/keyframes' { | ||
export const addon: KeyframesAddon; | ||
} | ||
|
||
// Presets | ||
|
||
declare module 'nano-css/preset/sheet' { | ||
export const preset: SheetPreset; | ||
} | ||
export const create: CreateNano; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {create} from './nano'; | ||
import {create} from '..'; | ||
|
||
const nano = create(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6611aac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build version:
4.0.0-fix-cssom.107
🤞fix-cssom
on CircleCI 🎉