Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reakit-system

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reakit-system - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

es/_rollupPluginBabelHelpers-7fc9bc78.js

16

CHANGELOG.md

@@ -6,2 +6,18 @@ # Change Log

## [0.6.3](https://github.com/reakit/reakit/tree/master/packages/reakit-system/compare/reakit-system@0.6.2...reakit-system@0.6.3) (2019-08-25)
### Bug Fixes
* **reakit-system:** Remove dependency on reakit type ([d5ea02c](https://github.com/reakit/reakit/tree/master/packages/reakit-system/commit/d5ea02c)), closes [#413](https://github.com/reakit/reakit/tree/master/packages/reakit-system/issues/413)
### Features
* Upgrade `reakit` peer dependency version ([73baeff](https://github.com/reakit/reakit/tree/master/packages/reakit-system/commit/73baeff))
## [0.6.2](https://github.com/reakit/reakit/tree/master/packages/reakit-system/compare/reakit-system@0.6.1...reakit-system@0.6.2) (2019-06-27)

@@ -8,0 +24,0 @@

1

createComponent/package.json
{
"name": "reakit-system/createComponent",
"private": true,
"sideEffects": false,
"main": "../lib/createComponent",

@@ -5,0 +6,0 @@ "module": "../es/createComponent",

{
"name": "reakit-system/createHook",
"private": true,
"sideEffects": false,
"main": "../lib/createHook",

@@ -5,0 +6,0 @@ "module": "../es/createHook",

2

dist/reakit-system.min.js

@@ -1,1 +0,1 @@

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e=e||self).ReakitSystem={},e.React)}(this,function(e,r){"use strict";function n(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function t(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{},o=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.forEach(function(r){n(e,r,t[r])})}return e}function o(e,r){if(null==e)return{};var n,t,o={},u=Object.keys(e);for(t=0;t<u.length;t++)n=u[t],r.indexOf(n)>=0||(o[n]=e[n]);return o}function u(e,r){for(var n={},t={},o=0,u=Object.keys(e);o<u.length;o++){var a=u[o];r.indexOf(a)>=0?n[a]=e[a]:t[a]=e[a]}return[n,t]}var a=r.createContext({}),i=function(e,n,t){void 0===t&&(t=n.children);var u=r.useContext(a);if(u.useCreateElement)return u.useCreateElement(e,n,t);if(function(e){return"function"==typeof e}(t)){n.children;return t(o(n,["children"]))}return r.createElement(e,n,t)};function s(e){return"object"==typeof e&&null!=e}function c(e,n){r.useDebugValue(e);var t=r.useContext(a);return null!=t[e]?t[e]:n}function f(e,n,o){void 0===n&&(n={}),void 0===o&&(o={});var u="use"+e+"Options";r.useDebugValue(u);var a=c(u);return a?t({},n,a(n,o)):n}function l(e,n,t){void 0===n&&(n={}),void 0===t&&(t={});var o="use"+e+"Props";r.useDebugValue(o);var u=c(o);return u?u(n,t):t}function v(e,r){var n={},t=e,o=Array.isArray(t),u=0;for(t=o?t:t[Symbol.iterator]();;){var a;if(o){if(u>=t.length)break;a=t[u++]}else{if((u=t.next()).done)break;a=u.value}for(var i=a,s=0,c=Object.keys(i);s<c.length;s++){var f=c[s];if(!r||r(i[f],f)){var l=n[f]||[];n[f]=[].concat(l,[i[f]])}}}return n}function p(e){for(var r=v(e,function(e){return"function"==typeof e}),n={},t=0,o=Object.keys(r);t<o.length;t++){var u=o[t],a=r[u];n[u]=1===a.length?a[0]:a.reduce(function(e,r){return function(){for(var n=arguments.length,t=new Array(n),o=0;o<n;o++)t[o]=arguments[o];return r.apply(void 0,t.slice(0,-1).concat([e.apply(void 0,t)]))}})}return n}function y(e){for(var r=v(e,s),n={},t=0,o=Object.keys(r);t<o.length;t++){var u=o[t],a=r[u];n[u]=Object.assign.apply(Object,[{}].concat(a))}return n}e.SystemContext=a,e.SystemProvider=function(e){var n=e.children,t=e.unstable_system;return r.createElement(a.Provider,{value:t},n)},e.createComponent=function(e){var n,a=e.as,s=e.useHook,c=e.keys,f=void 0===c?s&&s.__keys||[]:c,l=e.propsAreEqual,v=void 0===l?s&&s.__propsAreEqual:l,p=e.useCreateElement,y=void 0===p?i:p,d=function(e,r){var n=e.as,i=void 0===n?a:n,c=o(e,["as"]);if(s){var l=u(c,f),v=l[0],p=l[1],d=s(v,t({ref:r},p)),b=d.unstable_wrap,m=o(d,["unstable_wrap"]),_=i.render?i.render.__keys:i.__keys,O=_?u(c,_)[0]:{},k=y(i,t({},m,O));return b?b(k):k}return y(i,c)};return d.__keys=f,function(e,n){return r.memo(e,n)}((n=d,r.forwardRef(n)),v)},e.createHook=function(e){var r,n=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),t=function(r,t){return void 0===r&&(r={}),void 0===t&&(t={}),e.useOptions&&(r=e.useOptions(r,t)),r=f(e.name,r,t),e.useProps&&(t=e.useProps(r,t)),t=l(e.name,r,t),e.useCompose?t=e.useCompose(r,t):e.compose&&n.forEach(function(e){t=e(r,t)}),t};return t.__keys=[].concat(n.reduce(function(e,r){return[].concat(e,r.__keys||[])},[]),e.useState?e.useState.__keys:[],e.keys||[]),Boolean(e.propsAreEqual||n.find(function(e){return Boolean(e.__propsAreEqual)}))&&(t.__propsAreEqual=function(r,t){var o=e.propsAreEqual&&e.propsAreEqual(r,t);if(null!=o)return o;var u=n,a=Array.isArray(u),i=0;for(u=a?u:u[Symbol.iterator]();;){var c;if(a){if(i>=u.length)break;c=u[i++]}else{if((i=u.next()).done)break;c=i.value}var f=c.__propsAreEqual,l=f&&f(r,t);if(null!=l)return l}return function e(r,n,t){if(void 0===t&&(t=1),r===n)return!0;if(!r||!n)return!1;var o=Object.keys(r),u=Object.keys(n),a=o.length;if(u.length!==a)return!1;for(var i=0,c=o;i<c.length;i++){var f=c[i];if(r[f]!==n[f]&&!(t&&s(r[f])&&s(n[f])&&e(r[f],n[f],t-1)))return!1}return!0}(r,t)}),t},e.mergeSystem=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Object.assign.apply(Object,[{}].concat(r,[y(r),p(r)]))},e.useCreateElement=i,e.useOptions=f,e.useProps=l,e.useToken=c,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],r):r((e=e||self).ReakitSystem={},e.React)}(this,function(e,r){"use strict";function t(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function o(e){for(var r=1;r<arguments.length;r++){var o=null!=arguments[r]?arguments[r]:{};r%2?n(o,!0).forEach(function(r){t(e,r,o[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(o).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))})}return e}function u(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;n<u.length;n++)t=u[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}function a(e,r){for(var t={},n={},o=0,u=Object.keys(e);o<u.length;o++){var a=u[o];r.indexOf(a)>=0?t[a]=e[a]:n[a]=e[a]}return[t,n]}var i=r.createContext({}),s=function(e,t,n){void 0===n&&(n=t.children);var o=r.useContext(i);if(o.useCreateElement)return o.useCreateElement(e,t,n);if(function(e){return"function"==typeof e}(n)){t.children;return n(u(t,["children"]))}return r.createElement(e,t,n)};function c(e){return"object"==typeof e&&null!=e}function f(e,t){r.useDebugValue(e);var n=r.useContext(i);return null!=n[e]?n[e]:t}function l(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var u="use"+e+"Options";r.useDebugValue(u);var a=f(u);return a?o({},t,{},a(t,n)):t}function p(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var o="use"+e+"Props";r.useDebugValue(o);var u=f(o);return u?u(t,n):n}function v(e,r){var t={},n=e,o=Array.isArray(n),u=0;for(n=o?n:n[Symbol.iterator]();;){var a;if(o){if(u>=n.length)break;a=n[u++]}else{if((u=n.next()).done)break;a=u.value}for(var i=a,s=0,c=Object.keys(i);s<c.length;s++){var f=c[s];if(!r||r(i[f],f)){var l=t[f]||[];t[f]=[].concat(l,[i[f]])}}}return t}function y(e){for(var r=v(e,function(e){return"function"==typeof e}),t={},n=0,o=Object.keys(r);n<o.length;n++){var u=o[n],a=r[u];t[u]=1===a.length?a[0]:a.reduce(function(e,r){return function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];return r.apply(void 0,n.slice(0,-1).concat([e.apply(void 0,n)]))}})}return t}function d(e){for(var r=v(e,c),t={},n=0,o=Object.keys(r);n<o.length;n++){var u=o[n],a=r[u];t[u]=Object.assign.apply(Object,[{}].concat(a))}return t}e.SystemContext=i,e.SystemProvider=function(e){var t=e.children,n=e.unstable_system;return r.createElement(i.Provider,{value:n},t)},e.createComponent=function(e){var t,n=e.as,i=e.useHook,c=e.keys,f=void 0===c?i&&i.__keys||[]:c,l=e.propsAreEqual,p=void 0===l?i&&i.__propsAreEqual:l,v=e.useCreateElement,y=void 0===v?s:v,d=function(e,r){var t=e.as,s=void 0===t?n:t,c=u(e,["as"]);if(i){var l=a(c,f),p=l[0],v=l[1],d=i(p,o({ref:r},v)),b=d.unstable_wrap,O=u(d,["unstable_wrap"]),m=s.render?s.render.__keys:s.__keys,g=m?a(c,m)[0]:{},_=y(s,o({},O,{},g));return b?b(_):_}return y(s,c)};return d.__keys=f,function(e,t){return r.memo(e,t)}((t=d,r.forwardRef(t)),p)},e.createHook=function(e){var r,t=(r=e.compose,Array.isArray(r)?r:void 0!==r?[r]:[]),n=function(r,n){return void 0===r&&(r={}),void 0===n&&(n={}),e.useOptions&&(r=e.useOptions(r,n)),r=l(e.name,r,n),e.useProps&&(n=e.useProps(r,n)),n=p(e.name,r,n),e.useCompose?n=e.useCompose(r,n):e.compose&&t.forEach(function(e){n=e(r,n)}),n};return n.__keys=[].concat(t.reduce(function(e,r){return[].concat(e,r.__keys||[])},[]),e.useState?e.useState.__keys:[],e.keys||[]),Boolean(e.propsAreEqual||t.find(function(e){return Boolean(e.__propsAreEqual)}))&&(n.__propsAreEqual=function(r,n){var o=e.propsAreEqual&&e.propsAreEqual(r,n);if(null!=o)return o;var u=t,a=Array.isArray(u),i=0;for(u=a?u:u[Symbol.iterator]();;){var s;if(a){if(i>=u.length)break;s=u[i++]}else{if((i=u.next()).done)break;s=i.value}var f=s.__propsAreEqual,l=f&&f(r,n);if(null!=l)return l}return function e(r,t,n){if(void 0===n&&(n=1),r===t)return!0;if(!r||!t)return!1;var o=Object.keys(r),u=Object.keys(t),a=o.length;if(u.length!==a)return!1;for(var i=0,s=o;i<s.length;i++){var f=s[i];if(r[f]!==t[f]&&!(n&&c(r[f])&&c(t[f])&&e(r[f],t[f],n-1)))return!1}return!0}(r,n)}),n},e.mergeSystem=function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];return Object.assign.apply(Object,[{}].concat(r,[d(r),y(r)]))},e.useCreateElement=s,e.useOptions=l,e.useProps=p,e.useToken=f,Object.defineProperty(e,"__esModule",{value:!0})});
import { memo as memo$1, forwardRef as forwardRef$1 } from 'react';
import './SystemContext.js';
import { a as _objectWithoutPropertiesLoose, _ as _objectSpread } from './chunk-0d141714.js';
import { a as _objectWithoutPropertiesLoose, _ as _objectSpread2 } from './_rollupPluginBabelHelpers-7fc9bc78.js';
import { useCreateElement } from './useCreateElement.js';

@@ -35,3 +35,3 @@ import { splitProps } from 'reakit-utils/splitProps';

var _useHook = useHook(_options, _objectSpread({
var _useHook = useHook(_options, _objectSpread2({
ref: ref

@@ -45,3 +45,3 @@ }, htmlProps)),

var asOptions = asKeys ? splitProps(props, asKeys)[0] : {};
var element = useCreateElement$1(as, _objectSpread({}, elementProps, asOptions));
var element = useCreateElement$1(as, _objectSpread2({}, elementProps, {}, asOptions));

@@ -48,0 +48,0 @@ if (unstable_wrap) {

@@ -5,3 +5,3 @@ import 'react';

import { useProps } from './useProps.js';
import './chunk-0d141714.js';
import './_rollupPluginBabelHelpers-7fc9bc78.js';
import { useOptions } from './useOptions.js';

@@ -8,0 +8,0 @@ import { isObject } from 'reakit-utils/isObject';

@@ -5,3 +5,3 @@ import 'react';

export { useProps } from './useProps.js';
import './chunk-0d141714.js';
import './_rollupPluginBabelHelpers-7fc9bc78.js';
export { useOptions } from './useOptions.js';

@@ -8,0 +8,0 @@ export { useCreateElement } from './useCreateElement.js';

import { useContext, createElement } from 'react';
import { SystemContext } from './SystemContext.js';
import { a as _objectWithoutPropertiesLoose } from './chunk-0d141714.js';
import { a as _objectWithoutPropertiesLoose } from './_rollupPluginBabelHelpers-7fc9bc78.js';

@@ -5,0 +5,0 @@ function isRenderProp(children) {

import { useDebugValue } from 'react';
import './SystemContext.js';
import { useToken } from './useToken.js';
import { _ as _objectSpread } from './chunk-0d141714.js';
import { _ as _objectSpread2 } from './_rollupPluginBabelHelpers-7fc9bc78.js';

@@ -20,3 +20,3 @@ function useOptions(name, options, htmlProps) {

if (useHook) {
return _objectSpread({}, options, useHook(options, htmlProps));
return _objectSpread2({}, options, {}, useHook(options, htmlProps));
}

@@ -23,0 +23,0 @@

@@ -7,3 +7,3 @@ 'use strict';

require('./SystemContext.js');
var __chunk_1 = require('./chunk-002fc018.js');
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-b5804289.js');
var useCreateElement = require('./useCreateElement.js');

@@ -33,3 +33,3 @@ var splitProps = require('reakit-utils/splitProps');

as = _ref2$as === void 0 ? type : _ref2$as,
props = __chunk_1._objectWithoutPropertiesLoose(_ref2, ["as"]);
props = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_ref2, ["as"]);

@@ -41,7 +41,7 @@ if (useHook) {

var _useHook = useHook(_options, __chunk_1._objectSpread({
var _useHook = useHook(_options, _rollupPluginBabelHelpers._objectSpread2({
ref: ref
}, htmlProps)),
unstable_wrap = _useHook.unstable_wrap,
elementProps = __chunk_1._objectWithoutPropertiesLoose(_useHook, ["unstable_wrap"]); // @ts-ignore
elementProps = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(_useHook, ["unstable_wrap"]); // @ts-ignore

@@ -51,3 +51,3 @@

var asOptions = asKeys ? splitProps.splitProps(props, asKeys)[0] : {};
var element = useCreateElement$1(as, __chunk_1._objectSpread({}, elementProps, asOptions));
var element = useCreateElement$1(as, _rollupPluginBabelHelpers._objectSpread2({}, elementProps, {}, asOptions));

@@ -54,0 +54,0 @@ if (unstable_wrap) {

@@ -9,3 +9,3 @@ 'use strict';

var useProps = require('./useProps.js');
require('./chunk-002fc018.js');
require('./_rollupPluginBabelHelpers-b5804289.js');
var useOptions = require('./useOptions.js');

@@ -12,0 +12,0 @@ var isObject = require('reakit-utils/isObject');

@@ -9,3 +9,3 @@ 'use strict';

var useProps = require('./useProps.js');
require('./chunk-002fc018.js');
require('./_rollupPluginBabelHelpers-b5804289.js');
var useOptions = require('./useOptions.js');

@@ -12,0 +12,0 @@ var useCreateElement = require('./useCreateElement.js');

@@ -7,3 +7,3 @@ 'use strict';

var SystemContext = require('./SystemContext.js');
var __chunk_1 = require('./chunk-002fc018.js');
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-b5804289.js');

@@ -27,3 +27,3 @@ function isRenderProp(children) {

var _ = props.children,
rest = __chunk_1._objectWithoutPropertiesLoose(props, ["children"]);
rest = _rollupPluginBabelHelpers._objectWithoutPropertiesLoose(props, ["children"]);

@@ -30,0 +30,0 @@ return children(rest);

@@ -8,3 +8,3 @@ 'use strict';

var useToken = require('./useToken.js');
var __chunk_1 = require('./chunk-002fc018.js');
var _rollupPluginBabelHelpers = require('./_rollupPluginBabelHelpers-b5804289.js');

@@ -25,3 +25,3 @@ function useOptions(name, options, htmlProps) {

if (useHook) {
return __chunk_1._objectSpread({}, options, useHook(options, htmlProps));
return _rollupPluginBabelHelpers._objectSpread2({}, options, {}, useHook(options, htmlProps));
}

@@ -28,0 +28,0 @@

{
"name": "reakit-system/mergeSystem",
"private": true,
"sideEffects": false,
"main": "../lib/mergeSystem",

@@ -5,0 +6,0 @@ "module": "../es/mergeSystem",

{
"name": "reakit-system",
"version": "0.6.2",
"version": "0.6.3",
"description": "Reakit System utils",

@@ -34,3 +34,3 @@ "sideEffects": false,

"devDependencies": {
"reakit-utils": "^0.6.2"
"reakit-utils": "^0.6.3"
},

@@ -40,6 +40,6 @@ "peerDependencies": {

"react-dom": "^16.8.0",
"reakit": "^1.0.0-beta.2",
"reakit": "^1.0.0-beta.5",
"reakit-utils": "^0.6.0"
},
"gitHead": "f0edc09db25e86b822cb7072410145c7d990efbe"
"gitHead": "c2fb790b3a92211382c7e7a2bf751d0d723f62c3"
}
// TODO: Refactor
import * as React from "react";
import { BoxHTMLProps } from "reakit/Box/Box";
import { As, PropsWithAs } from "reakit-utils/types";

@@ -10,2 +9,7 @@ import { splitProps } from "reakit-utils/splitProps";

type BoxHTMLProps = React.HTMLAttributes<any> &
React.RefAttributes<any> & {
unstable_wrap?: (children: React.ReactNode) => JSX.Element;
};
type Hook<O> = {

@@ -12,0 +16,0 @@ (options?: O, props?: BoxHTMLProps): BoxHTMLProps;

{
"name": "reakit-system/SystemContext",
"private": true,
"sideEffects": false,
"main": "../lib/SystemContext",

@@ -5,0 +6,0 @@ "module": "../es/SystemContext",

{
"name": "reakit-system/SystemProvider",
"private": true,
"sideEffects": false,
"main": "../lib/SystemProvider",

@@ -5,0 +6,0 @@ "module": "../es/SystemProvider",

@@ -1,5 +0,7 @@

/// <reference types="react" />
import { BoxHTMLProps } from "reakit/Box/Box";
import * as React from "react";
import { As, PropsWithAs } from "reakit-utils/types";
import { useCreateElement as defaultUseCreateElement } from "./useCreateElement";
declare type BoxHTMLProps = React.HTMLAttributes<any> & React.RefAttributes<any> & {
unstable_wrap?: (children: React.ReactNode) => JSX.Element;
};
declare type Hook<O> = {

@@ -6,0 +8,0 @@ (options?: O, props?: BoxHTMLProps): BoxHTMLProps;

{
"name": "reakit-system/useCreateElement",
"private": true,
"sideEffects": false,
"main": "../lib/useCreateElement",

@@ -5,0 +6,0 @@ "module": "../es/useCreateElement",

{
"name": "reakit-system/useOptions",
"private": true,
"sideEffects": false,
"main": "../lib/useOptions",

@@ -5,0 +6,0 @@ "module": "../es/useOptions",

{
"name": "reakit-system/useProps",
"private": true,
"sideEffects": false,
"main": "../lib/useProps",

@@ -5,0 +6,0 @@ "module": "../es/useProps",

{
"name": "reakit-system/useToken",
"private": true,
"sideEffects": false,
"main": "../lib/useToken",

@@ -5,0 +6,0 @@ "module": "../es/useToken",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc