-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
953d45c
commit 7ab55c1
Showing
15 changed files
with
567 additions
and
0 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 @@ | ||
node_modules/ |
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,25 @@ | ||
import { DataSignal } from 's-js'; | ||
|
||
//CSSStyleDeclaration keys | ||
export type SClassType = { | ||
[k: string]: DataSignal<boolean> | boolean | ||
} | ||
|
||
export default function classes(...args: SClassType[]) { | ||
return function classes(node: any) { | ||
if (args) { | ||
const classNames: any[] = [] | ||
args.forEach((arg:SClassType) => { | ||
for (const key in arg) { | ||
const val: any = (arg as any)[key] | ||
if (typeof val == "function" ? val() : val) | ||
classNames.push(key) | ||
} | ||
}) | ||
node.className = classNames.join(" ") | ||
} | ||
} | ||
} | ||
|
||
|
||
|
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 { DataSignal } from 's-js'; | ||
export declare type SClassType = { | ||
[k: string]: DataSignal<boolean> | boolean; | ||
}; | ||
export default function classes(...args: SClassType[]): (node: any) => void; |
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,19 @@ | ||
export default function classes() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return function classes(node) { | ||
if (args) { | ||
var classNames_1 = []; | ||
args.forEach(function (arg) { | ||
for (var key in arg) { | ||
var val = arg[key]; | ||
if (typeof val == "function" ? val() : val) | ||
classNames_1.push(key); | ||
} | ||
}); | ||
node.className = classNames_1.join(" "); | ||
} | ||
}; | ||
} |
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 @@ | ||
export default function onkey(arg: any): (node: Node) => void; |
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,4 @@ | ||
export default function onkey(arg) { | ||
return function onkey(node) { | ||
}; | ||
} |
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,4 @@ | ||
export declare type SMouseEventType = { | ||
[k in "mousedown" | "mouseenter" | "mouseleave" | "mousemove" | "mouseout" | "mouseover" | "mouseup" | "show" | "click" | "contextmenu" | "dblclick"]?: (evt: MouseEvent) => void; | ||
}; | ||
export default function onmouse(arg: SMouseEventType): (node: Node) => void; |
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,15 @@ | ||
import { S } from 'surplus'; | ||
export default function onmouse(arg) { | ||
return function onmouse(node) { | ||
if (arg) { | ||
var _loop_1 = function (key) { | ||
var val = arg[key]; | ||
node.addEventListener(key, val, false); | ||
S.cleanup(function () { node.removeEventListener(key, val); }); | ||
}; | ||
for (var key in arg) { | ||
_loop_1(key); | ||
} | ||
} | ||
}; | ||
} |
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 { DataSignal } from 's-js'; | ||
export declare type SStyleType = { | ||
[k in "alignContent" | "alignItems" | "alignmentBaseline" | "alignSelf" | "animation" | "animationDelay" | "animationDirection" | "animationDuration" | "animationFillMode" | "animationIterationCount" | "animationName" | "animationPlayState" | "animationTimingFunction" | "backfaceVisibility" | "background" | "backgroundAttachment" | "backgroundClip" | "backgroundColor" | "backgroundImage" | "backgroundOrigin" | "backgroundPosition" | "backgroundPositionX" | "backgroundPositionY" | "backgroundRepeat" | "backgroundSize" | "baselineShift" | "border" | "borderBottom" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderColor" | "borderImage" | "borderImageOutset" | "borderImageRepeat" | "borderImageSlice" | "borderImageSource" | "borderImageWidth" | "borderLeft" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRadius" | "borderRight" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderStyle" | "borderTop" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "borderWidth" | "bottom" | "boxShadow" | "boxSizing" | "breakAfter" | "breakBefore" | "breakInside" | "captionSide" | "clear" | "clip" | "clipPath" | "clipRule" | "color" | "colorInterpolationFilters" | "columnCount" | "columnFill" | "columnGap" | "columnRule" | "columnRuleColor" | "columnRuleStyle" | "columnRuleWidth" | "columns" | "columnSpan" | "columnWidth" | "content" | "counterIncrement" | "counterReset" | "cssFloat" | "cssText" | "cursor" | "direction" | "display" | "dominantBaseline" | "emptyCells" | "enableBackground" | "fill" | "fillOpacity" | "fillRule" | "filter" | "flex" | "flexBasis" | "flexDirection" | "flexFlow" | "flexGrow" | "flexShrink" | "flexWrap" | "floodColor" | "floodOpacity" | "font" | "fontFamily" | "fontFeatureSettings" | "fontSize" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "fontWeight" | "glyphOrientationHorizontal" | "glyphOrientationVertical" | "height" | "imeMode" | "justifyContent" | "kerning" | "layoutGrid" | "layoutGridChar" | "layoutGridLine" | "layoutGridMode" | "layoutGridType" | "left" | "length" | "letterSpacing" | "lightingColor" | "lineBreak" | "lineHeight" | "listStyle" | "listStyleImage" | "listStylePosition" | "listStyleType" | "margin" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "marker" | "markerEnd" | "markerMid" | "markerStart" | "mask" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "msContentZoomChaining" | "msContentZooming" | "msContentZoomLimit" | "msContentZoomLimitMax" | "msContentZoomLimitMin" | "msContentZoomSnap" | "msContentZoomSnapPoints" | "msContentZoomSnapType" | "msFlowFrom" | "msFlowInto" | "msFontFeatureSettings" | "msGridColumn" | "msGridColumnAlign" | "msGridColumns" | "msGridColumnSpan" | "msGridRow" | "msGridRowAlign" | "msGridRows" | "msGridRowSpan" | "msHighContrastAdjust" | "msHyphenateLimitChars" | "msHyphenateLimitLines" | "msHyphenateLimitZone" | "msHyphens" | "msImeAlign" | "msOverflowStyle" | "msScrollChaining" | "msScrollLimit" | "msScrollLimitXMax" | "msScrollLimitXMin" | "msScrollLimitYMax" | "msScrollLimitYMin" | "msScrollRails" | "msScrollSnapPointsX" | "msScrollSnapPointsY" | "msScrollSnapType" | "msScrollSnapX" | "msScrollSnapY" | "msScrollTranslation" | "msTextCombineHorizontal" | "msTextSizeAdjust" | "msTouchAction" | "msTouchSelect" | "msUserSelect" | "msWrapFlow" | "msWrapMargin" | "msWrapThrough" | "opacity" | "order" | "orphans" | "outline" | "outlineColor" | "outlineOffset" | "outlineStyle" | "outlineWidth" | "overflow" | "overflowX" | "overflowY" | "padding" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "pageBreakAfter" | "pageBreakBefore" | "pageBreakInside" | "parentRule" | "perspective" | "perspectiveOrigin" | "pointerEvents" | "position" | "quotes" | "right" | "rotate" | "rubyAlign" | "rubyOverhang" | "rubyPosition" | "scale" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "tableLayout" | "textAlign" | "textAlignLast" | "textAnchor" | "textDecoration" | "textIndent" | "textJustify" | "textKashida" | "textKashidaSpace" | "textOverflow" | "textShadow" | "textTransform" | "textUnderlinePosition" | "top" | "touchAction" | "transform" | "transformOrigin" | "transformStyle" | "transition" | "transitionDelay" | "transitionDuration" | "transitionProperty" | "transitionTimingFunction" | "translate" | "unicodeBidi" | "verticalAlign" | "visibility" | "webkitAlignContent" | "webkitAlignItems" | "webkitAlignSelf" | "webkitAnimation" | "webkitAnimationDelay" | "webkitAnimationDirection" | "webkitAnimationDuration" | "webkitAnimationFillMode" | "webkitAnimationIterationCount" | "webkitAnimationName" | "webkitAnimationPlayState" | "webkitAnimationTimingFunction" | "webkitAppearance" | "webkitBackfaceVisibility" | "webkitBackgroundClip" | "webkitBackgroundOrigin" | "webkitBackgroundSize" | "webkitBorderBottomLeftRadius" | "webkitBorderBottomRightRadius" | "webkitBorderImage" | "webkitBorderRadius" | "webkitBorderTopLeftRadius" | "webkitBorderTopRightRadius" | "webkitBoxAlign" | "webkitBoxDirection" | "webkitBoxFlex" | "webkitBoxOrdinalGroup" | "webkitBoxOrient" | "webkitBoxPack" | "webkitBoxSizing" | "webkitColumnBreakAfter" | "webkitColumnBreakBefore" | "webkitColumnBreakInside" | "webkitColumnCount" | "webkitColumnGap" | "webkitColumnRule" | "webkitColumnRuleColor" | "webkitColumnRuleStyle" | "webkitColumnRuleWidth" | "webkitColumns" | "webkitColumnSpan" | "webkitColumnWidth" | "webkitFilter" | "webkitFlex" | "webkitFlexBasis" | "webkitFlexDirection" | "webkitFlexFlow" | "webkitFlexGrow" | "webkitFlexShrink" | "webkitFlexWrap" | "webkitJustifyContent" | "webkitOrder" | "webkitPerspective" | "webkitPerspectiveOrigin" | "webkitTapHighlightColor" | "webkitTextFillColor" | "webkitTextSizeAdjust" | "webkitTextStroke" | "webkitTextStrokeColor" | "webkitTextStrokeWidth" | "webkitTransform" | "webkitTransformOrigin" | "webkitTransformStyle" | "webkitTransition" | "webkitTransitionDelay" | "webkitTransitionDuration" | "webkitTransitionProperty" | "webkitTransitionTimingFunction" | "webkitUserModify" | "webkitUserSelect" | "webkitWritingMode" | "whiteSpace" | "widows" | "width" | "wordBreak" | "wordSpacing" | "wordWrap" | "writingMode" | "zIndex" | "zoom" | "resize" | "userSelect"]?: DataSignal<string> | string; | ||
}; | ||
export default function styles(...args: SStyleType[]): (node: any) => void; |
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,16 @@ | ||
export default function styles() { | ||
var args = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
args[_i] = arguments[_i]; | ||
} | ||
return function style(node) { | ||
if (args) { | ||
args.forEach(function (arg) { | ||
for (var key in arg) { | ||
var val = arg[key]; | ||
node["style"][key] = typeof val == "function" ? val() : val; | ||
} | ||
}); | ||
} | ||
}; | ||
} |
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 @@ | ||
|
||
export default function onkey(arg: any) { | ||
return function onkey(node: Node) { | ||
} | ||
} |
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,29 @@ | ||
import { S } from 'surplus' | ||
|
||
// https://developer.mozilla.org/en-US/docs/Web/Events : MouseEvent | ||
|
||
export type SMouseEventType = { | ||
[k in | ||
"mousedown" | | ||
"mouseenter" | | ||
"mouseleave" | | ||
"mousemove" | | ||
"mouseout" | | ||
"mouseover" | | ||
"mouseup" | | ||
"show" | | ||
"click" | | ||
"contextmenu" | | ||
"dblclick" | ||
]?: (evt: MouseEvent) => void} | ||
|
||
export default function onmouse(arg: SMouseEventType) { | ||
return function onmouse(node: Node) { | ||
if (arg) | ||
for (const key in arg) { | ||
const val: any = (arg as any)[key] | ||
node.addEventListener(key, val, false) | ||
S.cleanup(function () { node.removeEventListener(key, val) }) | ||
} | ||
} | ||
} |
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,59 @@ | ||
{ | ||
"_args": [ | ||
[ | ||
{ | ||
"raw": "C:\\\\Users\\\\codar.victor\\\\Documents\\\\GitHub\\\\surplus-mixins", | ||
"scope": null, | ||
"escapedName": null, | ||
"name": null, | ||
"rawSpec": "C:\\\\Users\\\\codar.victor\\\\Documents\\\\GitHub\\\\surplus-mixins", | ||
"spec": "C:\\Users\\codar.victor\\Documents\\GitHub\\surplus-mixins", | ||
"type": "directory" | ||
}, | ||
"C:\\Users\\codar.victor\\Documents\\GitHub\\surplus-material" | ||
] | ||
], | ||
"_from": "..\\surplus-mixins", | ||
"_id": "[email protected]", | ||
"_inCache": true, | ||
"_location": "/surplus-mixins", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"raw": "C:\\\\Users\\\\codar.victor\\\\Documents\\\\GitHub\\\\surplus-mixins", | ||
"scope": null, | ||
"escapedName": null, | ||
"name": null, | ||
"rawSpec": "C:\\\\Users\\\\codar.victor\\\\Documents\\\\GitHub\\\\surplus-mixins", | ||
"spec": "C:\\Users\\codar.victor\\Documents\\GitHub\\surplus-mixins", | ||
"type": "directory" | ||
}, | ||
"_requiredBy": [ | ||
"#USER", | ||
"/" | ||
], | ||
"_resolved": "file:..\\surplus-mixins", | ||
"_shasum": "5e4ab086d430ec4ec18b18f6d6446ab884d742e3", | ||
"_shrinkwrap": null, | ||
"_spec": "C:\\\\Users\\\\codar.victor\\\\Documents\\\\GitHub\\\\surplus-mixins", | ||
"_where": "C:\\Users\\codar.victor\\Documents\\GitHub\\surplus-material", | ||
"author": { | ||
"name": "ismail codar" | ||
}, | ||
"dependencies": { | ||
"surplus": "^0.4.3" | ||
}, | ||
"description": "Some surplus mixins", | ||
"devDependencies": { | ||
"typescript": "^2.3.4" | ||
}, | ||
"gitHead": "4a52dc0222fa9bd11729189ca25953fce7b25050", | ||
"license": "MIT", | ||
"main": "dist", | ||
"name": "surplus-mixins", | ||
"optionalDependencies": {}, | ||
"readme": "ERROR: No README data found!", | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"version": "1.0.0" | ||
} |
Oops, something went wrong.