-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 666-support-css-variables
- Loading branch information
Showing
26 changed files
with
897 additions
and
170 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
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,13 +1,17 @@ | ||
// render modes | ||
|
||
/** Do not re-render a component */ | ||
export const NO_RENDER = 0; | ||
/** Synchronously re-render a component and its children */ | ||
export const SYNC_RENDER = 1; | ||
/** Synchronously re-render a component, even if its lifecycle methods attempt to prevent it. */ | ||
export const FORCE_RENDER = 2; | ||
/** Queue asynchronous re-render of a component and it's children */ | ||
export const ASYNC_RENDER = 3; | ||
|
||
|
||
export const ATTR_KEY = '__preactattr_'; | ||
|
||
// DOM properties that should NOT have "px" added when numeric | ||
/** DOM properties that should NOT have "px" added when numeric */ | ||
export const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i; | ||
|
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,29 +1,22 @@ | ||
/** Global options | ||
* @public | ||
* @namespace options {Object} | ||
/** | ||
* @typedef {import('./component').Component} Component | ||
* @typedef {import('./vnode').VNode} VNode | ||
*/ | ||
export default { | ||
|
||
/** | ||
* If `true`, `prop` changes trigger synchronous component updates. | ||
* @name syncComponentUpdates | ||
* @type {boolean} | ||
* @default true | ||
*/ | ||
//syncComponentUpdates: true, | ||
|
||
/** | ||
* Processes all created VNodes. | ||
* @param {VNode} vnode A newly-created VNode to normalize/process | ||
*/ | ||
//vnode(vnode) { } | ||
|
||
/** Hook invoked after a component is mounted. */ | ||
// afterMount(component) { } | ||
/** | ||
* Global options | ||
* @public | ||
* @typedef Options | ||
* @property {boolean} [syncComponentUpdates] If `true`, `prop` changes trigger synchronous component updates. Defaults to true. | ||
* @property {(vnode: VNode) => void} [vnode] Processes all created VNodes. | ||
* @property {(component: Component) => void} [afterMount] Hook invoked after a component is mounted. | ||
* @property {(component: Component) => void} [afterUpdate] Hook invoked after the DOM is updated with a component's latest render. | ||
* @property {(component: Component) => void} [beforeUnmount] Hook invoked immediately before a component is unmounted. | ||
* @property {(rerender: function) => void} [debounceRendering] Hook invoked whenever a rerender is requested. Can be used to debounce rerenders. | ||
* @property {(event: Event) => Event | void} [event] Hook invoked before any Preact event listeners. The return value (if any) replaces the native browser event given to event listeners | ||
*/ | ||
|
||
/** Hook invoked after the DOM is updated with a component's latest render. */ | ||
// afterUpdate(component) { } | ||
/** @type {Options} */ | ||
const options = {}; | ||
|
||
/** Hook invoked immediately before a component is unmounted. */ | ||
// beforeUnmount(component) { } | ||
}; | ||
export default options; |
Oops, something went wrong.