@codesuma/baseline 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.ts CHANGED
@@ -30,7 +30,7 @@ export { default as state } from './lib/state'
30
30
 
31
31
  // Utilities
32
32
  export { createEmitter, emitter, IEmitter } from './utils/emitter'
33
- export { createStyler, injectCSS, IStyler } from './utils/styler'
33
+ export { createStyler, injectCSS, IStyler, CS } from './utils/styler'
34
34
  export { waitFor } from './utils/wait'
35
35
  export { withRipple } from './utils/ripple'
36
36
  export { nextId, shortUUID, uuidv4 } from './utils/id'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codesuma/baseline",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A minimal, imperative UI framework for building fast web apps. No virtual DOM, no magic, no dependencies.",
5
5
  "main": "index.ts",
6
6
  "types": "index.ts",
@@ -25,7 +25,7 @@
25
25
  "license": "MIT",
26
26
  "repository": {
27
27
  "type": "git",
28
- "url": "https://github.com/ardeshirvalipoor/base-ui.git"
28
+ "url": "https://gith ub.com/ardeshirvalipoor/base-ui.git"
29
29
  },
30
30
  "peerDependencies": {},
31
31
  "publishConfig": {
package/utils/styler.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { IBaseComponent, IBaseSVGComponent } from '../components/base'
2
2
 
3
3
  type Component = IBaseComponent<any> | IBaseSVGComponent<any>
4
- type StyleObj = Partial<CSSStyleDeclaration> & Record<string, any>
4
+ export type CS = Partial<CSSStyleDeclaration> & Record<string, any>
5
5
 
6
6
  export function createStyler(base: Component): IStyler {
7
7
  return {
8
- style(s: StyleObj, delay?: number) {
8
+ style(s: CS, delay?: number) {
9
9
  const apply = () => {
10
10
  const keys = Object.keys(s)
11
11
  for (let i = 0; i < keys.length; i++) {
@@ -47,10 +47,11 @@ export function injectCSS(id: string, css: string) {
47
47
  }
48
48
 
49
49
  export interface IStyler {
50
- style(s: StyleObj, delay?: number): Component
50
+ style(s: CS, delay?: number): Component
51
51
  addClass(...classes: string[]): Component
52
52
  removeClass(...classes: string[]): Component
53
53
  toggleClass(cls: string, force?: boolean): Component
54
54
  }
55
55
 
56
+
56
57
  export default createStyler