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

@atlaskit/motion

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/motion - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

dist/cjs/utils/use-layout-effect.d.ts

13

CHANGELOG.md
# @atlaskit/motion
## 0.2.1
### Patch Changes
- [patch][166d7b1626](https://bitbucket.org/atlassian/atlassian-frontend/commits/166d7b1626):
Fixes motion blowing up when rendered on the server. - @atlaskit/logo@12.3.1
- @atlaskit/section-message@4.1.4
- @atlaskit/docs@8.3.1
- @atlaskit/button@13.3.6
- @atlaskit/tooltip@15.2.2
## 0.2.0

@@ -4,0 +17,0 @@

4

dist/cjs/entering/shrink-out.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var react_1 = require("react");
var use_layout_effect_1 = require("../utils/use-layout-effect");
var exiting_persistence_1 = require("./exiting-persistence");

@@ -17,3 +17,3 @@ var use_element_ref_1 = require("../utils/use-element-ref");

var direction = exiting.isExiting ? 'exiting' : 'entering';
react_1.useLayoutEffect(function () {
use_layout_effect_1.useLayoutEffect(function () {
if (exiting.isExiting && element) {

@@ -20,0 +20,0 @@ var newStyles = {

@@ -5,2 +5,3 @@ "use strict";

var react_1 = tslib_1.__importStar(require("react"));
var use_layout_effect_1 = require("../utils/use-layout-effect");
var use_unique_id_1 = require("../utils/use-unique-id");

@@ -38,3 +39,3 @@ var StaggeredEntranceContext = react_1.createContext(function () { return ({ isReady: true, delay: 0, ref: function () { } }); });

}), 2), actualColumns = _d[0], setActualColumns = _d[1];
react_1.useLayoutEffect(function () {
use_layout_effect_1.useLayoutEffect(function () {
// We want to only run this code when we are in "responsive" mode.

@@ -41,0 +42,0 @@ // It is assumed we are in responsive mode if `columns` is "responsive",

@@ -5,2 +5,3 @@ "use strict";

var react_1 = require("react");
var use_layout_effect_1 = require("../utils/use-layout-effect");
var accessibility_1 = require("../utils/accessibility");

@@ -26,3 +27,3 @@ var durations_1 = require("../utils/durations");

});
react_1.useLayoutEffect(function () {
use_layout_effect_1.useLayoutEffect(function () {
if (accessibility_1.isReducedMotion() || !element || !prevDimensions.current) {

@@ -29,0 +30,0 @@ return;

@@ -9,2 +9,5 @@ "use strict";

exports.isReducedMotion = function () {
if (typeof window === 'undefined' || !('matchMedia' in window)) {
return false;
}
var matches = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

@@ -11,0 +14,0 @@ return matches;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var use_layout_effect_1 = require("../utils/use-layout-effect");
/**

@@ -12,3 +13,3 @@ * This hook tries to emulate the getSnapshotBeforeUpdate lifecycle method.

}
react_1.useLayoutEffect(function () {
use_layout_effect_1.useLayoutEffect(function () {
isFirstRender.current = false;

@@ -15,0 +16,0 @@ }, []);

{
"name": "@atlaskit/motion",
"version": "0.2.0",
"version": "0.2.1",
"sideEffects": false
}
import { __read } from "tslib";
import { useLayoutEffect } from 'react';
import { useLayoutEffect } from '../utils/use-layout-effect';
import { useExitingPersistence } from './exiting-persistence';

@@ -4,0 +4,0 @@ import { useElementRef } from '../utils/use-element-ref';

import { __read } from "tslib";
import React, { useState, useRef, useLayoutEffect, createContext, useContext, } from 'react';
import React, { useState, useRef, createContext, useContext } from 'react';
import { useLayoutEffect } from '../utils/use-layout-effect';
import { useUniqueId } from '../utils/use-unique-id';

@@ -4,0 +5,0 @@ var StaggeredEntranceContext = createContext(function () { return ({ isReady: true, delay: 0, ref: function () { } }); });

import { __read, __rest } from "tslib";
import { useRef, useLayoutEffect } from 'react';
import { useRef } from 'react';
import { useLayoutEffect } from '../utils/use-layout-effect';
import { isReducedMotion } from '../utils/accessibility';

@@ -4,0 +5,0 @@ import { mediumDurationMs } from '../utils/durations';

@@ -7,2 +7,5 @@ /**

export var isReducedMotion = function () {
if (typeof window === 'undefined' || !('matchMedia' in window)) {
return false;
}
var matches = window.matchMedia('(prefers-reduced-motion: reduce)').matches;

@@ -9,0 +12,0 @@ return matches;

@@ -1,2 +0,3 @@

import { useRef, useLayoutEffect } from 'react';
import { useRef } from 'react';
import { useLayoutEffect } from '../utils/use-layout-effect';
/**

@@ -3,0 +4,0 @@ * This hook tries to emulate the getSnapshotBeforeUpdate lifecycle method.

{
"name": "@atlaskit/motion",
"version": "0.2.0",
"version": "0.2.1",
"sideEffects": false
}
{
"name": "@atlaskit/motion",
"version": "0.2.0",
"version": "0.2.1",
"description": "Atlassian motion variables, components and more.",

@@ -32,9 +32,11 @@ "publishConfig": {

"devDependencies": {
"@atlaskit/button": "^13.3.5",
"@atlaskit/docs": "^8.3.0",
"@atlaskit/logo": "^12.1.8",
"@atlaskit/build-utils": "^2.4.0",
"@atlaskit/button": "^13.3.6",
"@atlaskit/docs": "^8.3.1",
"@atlaskit/logo": "^12.3.1",
"@atlaskit/lozenge": "^9.1.3",
"@atlaskit/section-message": "^4.1.3",
"@atlaskit/section-message": "^4.1.4",
"@atlaskit/ssr": "^0.1.1",
"@atlaskit/theme": "^9.5.0",
"@atlaskit/tooltip": "^15.2.1",
"@atlaskit/tooltip": "^15.2.2",
"@atlaskit/visual-regression": "^0.1.3",

@@ -41,0 +43,0 @@ "@testing-library/react": "^8.0.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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