-
-
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: 🎸 move TypeScript typings inline next to implementations
BREAKING CHANGE: 🧨 refactoring TypeScript types might break some TypeScript builds
- Loading branch information
Showing
21 changed files
with
88 additions
and
119 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
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
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 ComponentAddon { | ||
Component; | ||
} | ||
|
||
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,15 +1,17 @@ | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface CSSOMRule extends CSSRule { | ||
index: number; | ||
style: CSSStyleDeclaration; | ||
styleMap: any; | ||
} | ||
|
||
export interface AddonCSSOM { | ||
export interface CSSOMAddon { | ||
/** | ||
* @param selector CSS rule selector string. | ||
* @param prelude Media query at-rule prelude string. | ||
*/ | ||
createRule(selector: string, prelude: string): CSSOMRule; | ||
} | ||
|
||
export function addon<Nano extends {sh: HTMLStyleElement}>(nano: Nano): Nano & AddonCSSOM; | ||
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 DecoratorAddon { | ||
css; | ||
} | ||
|
||
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 {CssLikeObject, TDynamicCss} from '../types/common'; | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface DruleAddon { | ||
drule: (css: CssLikeObject, block?: string) => TDynamicCss; | ||
} | ||
|
||
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
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
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
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
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
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,12 +1,13 @@ | ||
import {AddonCSSOM} from './cssom'; | ||
import {CSSOMAddon} from './cssom'; | ||
import {Css} from './vcssom/cssToTree'; | ||
import {NanoRenderer} from '../types/nano'; | ||
|
||
export interface VSheet { | ||
diff(css: Css); | ||
} | ||
|
||
export interface AddonVCSSOM { | ||
export interface VCSSOMAddon { | ||
VSheet: new () => VSheet; | ||
} | ||
|
||
export function addon<Nano extends AddonCSSOM>(nano: Nano): Nano & AddonVCSSOM; | ||
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
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
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 {NanoOptions, NanoRenderer} from '../types/nano'; | ||
import {RuleAddon} from '../addon/rule'; | ||
import {SheetAddon} from '../addon/sheet'; | ||
|
||
type SheetPreset = (options: NanoOptions) => NanoRenderer & RuleAddon & SheetAddon; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.