@tramvai/module-client-hints 1.90.2 → 1.91.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import type { CONTEXT_TOKEN, COOKIE_MANAGER_TOKEN } from '@tramvai/module-common';
1
+ import type { CONTEXT_TOKEN } from '@tramvai/tokens-common';
2
+ import type { COOKIE_MANAGER_TOKEN } from '@tramvai/tokens-cookie';
2
3
  declare global {
3
4
  interface Window {
4
5
  DocumentTouch?: any;
package/lib/browser.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import { Module, provide, commandLineListTokens } from '@tramvai/core';
3
- import { COMBINE_REDUCERS, STORE_TOKEN, CONTEXT_TOKEN, COOKIE_MANAGER_TOKEN } from '@tramvai/module-common';
3
+ import { COMBINE_REDUCERS, STORE_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
4
+ import { COOKIE_MANAGER_TOKEN } from '@tramvai/tokens-cookie';
4
5
  import { createToken } from '@tinkoff/dippy';
5
6
  import debounce from '@tinkoff/utils/function/debounce';
6
7
  import { createEvent, createReducer, useSelector } from '@tramvai/state';
@@ -1,4 +1,5 @@
1
- import type { CONTEXT_TOKEN, COOKIE_MANAGER_TOKEN } from '@tramvai/module-common';
1
+ import type { CONTEXT_TOKEN } from '@tramvai/tokens-common';
2
+ import type { COOKIE_MANAGER_TOKEN } from '@tramvai/tokens-cookie';
2
3
  export declare const readMediaCommand: ({ context, cookieManager, }: {
3
4
  context: typeof CONTEXT_TOKEN;
4
5
  cookieManager: typeof COOKIE_MANAGER_TOKEN;
package/lib/server.es.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from 'tslib';
2
2
  import { Module, Scope, commandLineListTokens } from '@tramvai/core';
3
- import { COMBINE_REDUCERS, CREATE_CACHE_TOKEN, REQUEST_MANAGER_TOKEN, STORE_TOKEN, CONTEXT_TOKEN, COOKIE_MANAGER_TOKEN } from '@tramvai/module-common';
3
+ import { COMBINE_REDUCERS, CREATE_CACHE_TOKEN, REQUEST_MANAGER_TOKEN, STORE_TOKEN, CONTEXT_TOKEN } from '@tramvai/tokens-common';
4
+ import { COOKIE_MANAGER_TOKEN } from '@tramvai/tokens-cookie';
4
5
  import { parse } from '@tinkoff/user-agent';
5
6
  import { createEvent, createReducer, useSelector } from '@tramvai/state';
6
7
  import pathOr from '@tinkoff/utils/object/pathOr';
package/lib/server.js CHANGED
@@ -4,7 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
6
  var core = require('@tramvai/core');
7
- var moduleCommon = require('@tramvai/module-common');
7
+ var tokensCommon = require('@tramvai/tokens-common');
8
+ var tokensCookie = require('@tramvai/tokens-cookie');
8
9
  var userAgent = require('@tinkoff/user-agent');
9
10
  var state = require('@tramvai/state');
10
11
  var pathOr = require('@tinkoff/utils/object/pathOr');
@@ -81,7 +82,7 @@ const readMediaCommand = ({ context, cookieManager, }) => {
81
82
  const USER_AGENT_TOKEN = dippy.createToken('userAgent');
82
83
 
83
84
  const providers = [
84
- { provide: moduleCommon.COMBINE_REDUCERS, multi: true, useValue: [UserAgentStore, MediaStore] },
85
+ { provide: tokensCommon.COMBINE_REDUCERS, multi: true, useValue: [UserAgentStore, MediaStore] },
85
86
  ];
86
87
 
87
88
  function fromClientHints(media) {
@@ -134,7 +135,7 @@ exports.ClientHintsModule = tslib.__decorate([
134
135
  return createCache('userAgent', { max: 50 });
135
136
  },
136
137
  deps: {
137
- createCache: moduleCommon.CREATE_CACHE_TOKEN,
138
+ createCache: tokensCommon.CREATE_CACHE_TOKEN,
138
139
  },
139
140
  },
140
141
  {
@@ -149,7 +150,7 @@ exports.ClientHintsModule = tslib.__decorate([
149
150
  return result;
150
151
  },
151
152
  deps: {
152
- requestManager: moduleCommon.REQUEST_MANAGER_TOKEN,
153
+ requestManager: tokensCommon.REQUEST_MANAGER_TOKEN,
153
154
  cache: 'userAgentLruCache',
154
155
  },
155
156
  },
@@ -163,7 +164,7 @@ exports.ClientHintsModule = tslib.__decorate([
163
164
  },
164
165
  deps: {
165
166
  userAgent: USER_AGENT_TOKEN,
166
- store: moduleCommon.STORE_TOKEN,
167
+ store: tokensCommon.STORE_TOKEN,
167
168
  },
168
169
  },
169
170
  {
@@ -171,8 +172,8 @@ exports.ClientHintsModule = tslib.__decorate([
171
172
  multi: true,
172
173
  useFactory: readMediaCommand,
173
174
  deps: {
174
- context: moduleCommon.CONTEXT_TOKEN,
175
- cookieManager: moduleCommon.COOKIE_MANAGER_TOKEN,
175
+ context: tokensCommon.CONTEXT_TOKEN,
176
+ cookieManager: tokensCookie.COOKIE_MANAGER_TOKEN,
176
177
  },
177
178
  },
178
179
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/module-client-hints",
3
- "version": "1.90.2",
3
+ "version": "1.91.0",
4
4
  "description": "",
5
5
  "main": "lib/server.js",
6
6
  "module": "lib/server.es.js",
@@ -20,15 +20,16 @@
20
20
  "build-for-publish": "true"
21
21
  },
22
22
  "dependencies": {
23
- "@tinkoff/user-agent": "0.3.303",
23
+ "@tinkoff/user-agent": "0.3.309",
24
24
  "@tinkoff/utils": "^2.1.2",
25
25
  "@tramvai/safe-strings": "0.4.3",
26
- "@tramvai/tokens-child-app": "1.90.2"
26
+ "@tramvai/tokens-common": "1.91.0",
27
+ "@tramvai/tokens-cookie": "1.91.0",
28
+ "@tramvai/tokens-child-app": "1.91.0"
27
29
  },
28
30
  "peerDependencies": {
29
- "@tramvai/core": "1.90.2",
30
- "@tramvai/module-common": "1.90.2",
31
- "@tramvai/state": "1.90.2",
31
+ "@tramvai/core": "1.91.0",
32
+ "@tramvai/state": "1.91.0",
32
33
  "@tinkoff/dippy": "0.7.39",
33
34
  "react": ">=16.8.0",
34
35
  "react-dom": ">=16.8.0",