hyperapplicable
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -16,3 +16,3 @@ import { Action, MaybeVNode, CustomPayloads, Dispatch, Effect, Unsubscribe, ClassProp, VNode, Dispatchable } from 'hyperapp'; | ||
declare const box: <S>(classProp: ClassProp, content: Content<S>) => VNode<S>; | ||
declare const box: <S>(classProp: ClassProp, content: Content<S> | Content<S>[]) => VNode<S>; | ||
@@ -19,0 +19,0 @@ declare const contentNode: <S>(x: Content<S>) => MaybeVNode<S>; |
@@ -7,3 +7,6 @@ import { text, h } from "hyperapp"; | ||
const vista = (views) => (state) => Array.isArray(views) ? views.map((view) => contentView(view)(state)) : [contentView(views)(state)]; | ||
const box = (classProp, content) => h("div", { class: classProp }, contentNode(content)); | ||
const box = (classProp, content) => { | ||
const stuff = Array.isArray(content) ? content.map(contentNode) : contentNode(content); | ||
return h("div", { class: classProp }, stuff); | ||
}; | ||
const unite = (transform, stateForm, payload) => { | ||
@@ -10,0 +13,0 @@ if (!Array.isArray(stateForm)) { |
@@ -1,1 +0,1 @@ | ||
(function(e,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],o):(e=typeof globalThis!="undefined"?globalThis:e||self,o(e.hyperapplicable={},e.Hyperapp))})(this,function(e,o){"use strict";const f=n=>typeof n=="number"||typeof n=="string"?o.text(n):n,s=n=>t=>typeof n=="function"?n(t):f(n),a=n=>typeof n=="number"||typeof n=="string"||n==null||typeof n=="boolean"||d(n),d=n=>n!=null&&typeof n=="object"&&"node"in n,l=n=>t=>Array.isArray(n)?n.map(i=>s(i)(t)):[s(n)(t)],A=(n,t)=>o.h("div",{class:n},f(t)),y=(n,t,i)=>{if(!Array.isArray(t))return n(t,i);const[u,...c]=t,r=n(u,i);if(!Array.isArray(r))return[r,...c];const[S,...V]=r;return[S,...c,...V]},h=n=>(t,i)=>n.reduce((u,c)=>y(c,u,i),t),b=n=>typeof n=="function"||Array.isArray(n)&&n.length>0,p=(n,t)=>{window.requestAnimationFrame(()=>n(t))},m=n=>[p,n],N=(n,t)=>typeof t=="function"?"function":t,g=n=>t=>o.h("pre",{},o.text(`${n}: ${JSON.stringify(t[n],N,2)}`));e.box=A,e.contentNode=f,e.contentView=s,e.handleWith=h,e.isAction=b,e.isContent=a,e.isVNode=d,e.next=m,e.readout=g,e.unite=y,e.vista=l,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(e,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("hyperapp")):typeof define=="function"&&define.amd?define(["exports","hyperapp"],o):(e=typeof globalThis!="undefined"?globalThis:e||self,o(e.hyperapplicable={},e.Hyperapp))})(this,function(e,o){"use strict";const c=t=>typeof t=="number"||typeof t=="string"?o.text(t):t,s=t=>n=>typeof t=="function"?t(n):c(t),a=t=>typeof t=="number"||typeof t=="string"||t==null||typeof t=="boolean"||d(t),d=t=>t!=null&&typeof t=="object"&&"node"in t,l=t=>n=>Array.isArray(t)?t.map(i=>s(i)(n)):[s(t)(n)],A=(t,n)=>{const i=Array.isArray(n)?n.map(c):c(n);return o.h("div",{class:t},i)},y=(t,n,i)=>{if(!Array.isArray(n))return t(n,i);const[f,...r]=n,u=t(f,i);if(!Array.isArray(u))return[u,...r];const[S,...V]=u;return[S,...r,...V]},h=t=>(n,i)=>t.reduce((f,r)=>y(r,f,i),n),p=t=>typeof t=="function"||Array.isArray(t)&&t.length>0,b=(t,n)=>{window.requestAnimationFrame(()=>t(n))},m=t=>[b,t],N=(t,n)=>typeof n=="function"?"function":n,g=t=>n=>o.h("pre",{},o.text(`${t}: ${JSON.stringify(n[t],N,2)}`));e.box=A,e.contentNode=c,e.contentView=s,e.handleWith=h,e.isAction=p,e.isContent=a,e.isVNode=d,e.next=m,e.readout=g,e.unite=y,e.vista=l,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "hyperapplicable", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "A utility library for Hyperapp.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8335
61