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

@uniformdev/context-remix

Package Overview
Dependencies
Maintainers
9
Versions
608
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniformdev/context-remix - npm Package Compare versions

Comparing version 16.0.0 to 16.0.1-alpha.164

2

dist/index.d.ts

@@ -20,3 +20,3 @@ import { CookieTransitionDataStoreOptions, CookieTransitionDataStore, Context } from '@uniformdev/context';

*/
declare const RemixUniformContext: React__default.FC<Omit<UniformContextProps, 'trackRouteOnRender' | 'context'>>;
declare const RemixUniformContext: React__default.FC<React__default.PropsWithChildren<Omit<UniformContextProps, 'trackRouteOnRender' | 'context'>>>;

@@ -23,0 +23,0 @@ /**

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

import{parse as x}from"cookie";import{CookieTransitionDataStore as p,UNIFORM_DEFAULT_COOKIE_NAME as d}from"@uniformdev/context";var c=class extends p{constructor({request:r,...o}){var e,n;super({...o,serverCookieValue:r?x((e=r.headers.get("cookie"))!=null?e:"")[(n=o.cookieName)!=null?n:d]:void 0})}};import{UniformContext as C}from"@uniformdev/context-react";import{useLocation as R}from"@remix-run/react";import{parse as l}from"cookie";import U from"react";import{useEffect as k}from"react";import*as i from"react";var f=i.createContext(null),D=f.Provider;function u(){let t=i.useContext(f);if(t===null)throw new Error("useRemixUniformProvider must be used within a RemixUniformProvider");return t}var _=({children:t,...r})=>{let o=u(),e=R();return k(()=>{var a;if(typeof document=="undefined")return;let n=new URL(`${document.location.protocol}//${document.location.host}${e.pathname}${e.search}`);o.update({url:n,cookies:l((a=document.cookie)!=null?a:"")})},[e,o]),U.createElement(C,{...r,context:o,trackRouteOnRender:!1},t)};export{c as RemixCookieTransitionDataStore,_ as RemixUniformContext,D as RemixUniformContextProvider,u as useRemixUniformProvider};
import{parse as u}from"cookie";import{CookieTransitionDataStore as x,UNIFORM_DEFAULT_COOKIE_NAME as d}from"@uniformdev/context";var c=class extends x{constructor({request:r,...o}){var e,n;super({...o,serverCookieValue:r?u((e=r.headers.get("cookie"))!=null?e:"")[(n=o.cookieName)!=null?n:d]:void 0})}};import{UniformContext as C}from"@uniformdev/context-react";import{useLocation as R}from"@remix-run/react";import{parse as l}from"cookie";import U from"react";import{useEffect as k}from"react";import*as i from"react";var f=i.createContext(null),D=f.Provider;function p(){let t=i.useContext(f);if(t===null)throw new Error("useRemixUniformProvider must be used within a RemixUniformProvider");return t}var _=({children:t,...r})=>{let o=p(),e=R();return k(()=>{var a;if(typeof document=="undefined")return;let n=new URL(`${document.location.protocol}//${document.location.host}${e.pathname}${e.search}`);o.update({url:n,cookies:l((a=document.cookie)!=null?a:"")})},[e,o]),U.createElement(C,{...r,context:o,trackRouteOnRender:!1},t)};export{c as RemixCookieTransitionDataStore,_ as RemixUniformContext,D as RemixUniformContextProvider,p as useRemixUniformProvider};

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

var v=Object.create;var i=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)i(o,t,{get:e[t],enumerable:!0})},x=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!E.call(o,r)&&r!==t&&i(o,r,{get:()=>e[r],enumerable:!(n=P(e,r))||n.enumerable});return o};var p=(o,e,t)=>(t=o!=null?v(D(o)):{},x(e||!o||!o.__esModule?i(t,"default",{value:o,enumerable:!0}):t,o)),w=o=>x(i({},"__esModule",{value:!0}),o);var F={};T(F,{RemixCookieTransitionDataStore:()=>a,RemixUniformContext:()=>$,RemixUniformContextProvider:()=>S,useRemixUniformProvider:()=>f});module.exports=w(F);var d=require("cookie"),m=require("@uniformdev/context"),a=class extends m.CookieTransitionDataStore{constructor({request:e,...t}){var n,r;super({...t,serverCookieValue:e?(0,d.parse)((n=e.headers.get("cookie"))!=null?n:"")[(r=t.cookieName)!=null?r:m.UNIFORM_DEFAULT_COOKIE_NAME]:void 0})}};var R=require("@uniformdev/context-react"),l=require("@remix-run/react"),U=require("cookie"),k=p(require("react")),O=require("react");var s=p(require("react")),C=s.createContext(null),S=C.Provider;function f(){let o=s.useContext(C);if(o===null)throw new Error("useRemixUniformProvider must be used within a RemixUniformProvider");return o}var $=({children:o,...e})=>{let t=f(),n=(0,l.useLocation)();return(0,O.useEffect)(()=>{var u;if(typeof document=="undefined")return;let r=new URL(`${document.location.protocol}//${document.location.host}${n.pathname}${n.search}`);t.update({url:r,cookies:(0,U.parse)((u=document.cookie)!=null?u:"")})},[n,t]),k.default.createElement(R.UniformContext,{...e,context:t,trackRouteOnRender:!1},o)};0&&(module.exports={RemixCookieTransitionDataStore,RemixUniformContext,RemixUniformContextProvider,useRemixUniformProvider});
var P=Object.create;var i=Object.defineProperty;var v=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty;var T=(o,e)=>{for(var t in e)i(o,t,{get:e[t],enumerable:!0})},u=(o,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of h(e))!E.call(o,r)&&r!==t&&i(o,r,{get:()=>e[r],enumerable:!(n=v(e,r))||n.enumerable});return o};var x=(o,e,t)=>(t=o!=null?P(D(o)):{},u(e||!o||!o.__esModule?i(t,"default",{value:o,enumerable:!0}):t,o)),w=o=>u(i({},"__esModule",{value:!0}),o);var F={};T(F,{RemixCookieTransitionDataStore:()=>a,RemixUniformContext:()=>$,RemixUniformContextProvider:()=>S,useRemixUniformProvider:()=>f});module.exports=w(F);var d=require("cookie"),m=require("@uniformdev/context"),a=class extends m.CookieTransitionDataStore{constructor({request:e,...t}){var n,r;super({...t,serverCookieValue:e?(0,d.parse)((n=e.headers.get("cookie"))!=null?n:"")[(r=t.cookieName)!=null?r:m.UNIFORM_DEFAULT_COOKIE_NAME]:void 0})}};var R=require("@uniformdev/context-react"),l=require("@remix-run/react"),U=require("cookie"),k=x(require("react")),O=require("react");var s=x(require("react")),C=s.createContext(null),S=C.Provider;function f(){let o=s.useContext(C);if(o===null)throw new Error("useRemixUniformProvider must be used within a RemixUniformProvider");return o}var $=({children:o,...e})=>{let t=f(),n=(0,l.useLocation)();return(0,O.useEffect)(()=>{var p;if(typeof document=="undefined")return;let r=new URL(`${document.location.protocol}//${document.location.host}${n.pathname}${n.search}`);t.update({url:r,cookies:(0,U.parse)((p=document.cookie)!=null?p:"")})},[n,t]),k.default.createElement(R.UniformContext,{...e,context:t,trackRouteOnRender:!1},o)};0&&(module.exports={RemixCookieTransitionDataStore,RemixUniformContext,RemixUniformContextProvider,useRemixUniformProvider});
{
"name": "@uniformdev/context-remix",
"version": "16.0.0",
"version": "16.0.1-alpha.164+c3b15fc3f",
"description": "Uniform Context Remix integration package",

@@ -26,11 +26,11 @@ "license": "SEE LICENSE IN LICENSE.txt",

"devDependencies": {
"@remix-run/react": "1.4.1",
"@types/cookie": "0.5.0",
"@types/react": "17.0.44",
"react": "17.0.2",
"react-dom": "17.0.2"
"@remix-run/react": "1.5.1",
"@types/cookie": "0.5.1",
"@types/react": "18.0.9",
"react": "18.1.0",
"react-dom": "18.1.0"
},
"dependencies": {
"@uniformdev/context": "^16.0.0",
"@uniformdev/context-react": "^16.0.0",
"@uniformdev/context": "^16.0.1-alpha.164+c3b15fc3f",
"@uniformdev/context-react": "^16.0.1-alpha.164+c3b15fc3f",
"cookie": "0.5.0"

@@ -49,3 +49,3 @@ },

},
"gitHead": "72f1d98e96004c4ebf4bea49bf27aa4ecc036e33"
"gitHead": "c3b15fc3f3101dd990d7adfe84cb7e0bad77899d"
}

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