@teambit/user-agent 0.0.421 → 0.0.424
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.
- package/dist/index.js.map +1 -1
- package/dist/user-agent.aspect.js.map +1 -1
- package/dist/user-agent.composition.js.map +1 -1
- package/dist/user-agent.ui.runtime.js.map +1 -1
- package/package-tar/teambit-user-agent-0.0.424.tgz +0 -0
- package/package.json +3 -3
- package/{preview-1652808661748.js → preview-1653227849497.js} +2 -2
- package/tsconfig.json +1 -1
- package/package-tar/teambit-user-agent-0.0.421.tgz +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export { UserAgentAspect, UserAgentAspect as default } from './user-agent.aspect';\nexport type { UserAgentUI } from './user-agent.ui.runtime';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["UserAgentAspect","Aspect","create","id"],"sources":["user-agent.aspect.ts"],"sourcesContent":["import { Aspect } from '@teambit/harmony';\n\nexport const UserAgentAspect = Aspect.create({\n id: 'teambit.ui-foundation/user-agent',\n});\n\nexport default UserAgentAspect;\n"],"mappings":";;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,eAAe,GAAGC,iBAAA,CAAOC,MAAP,CAAc;EAC3CC,EAAE,EAAE;AADuC,CAAd,CAAxB;;;eAIQH,e"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["Logo","height","display","justifyContent","width"],"sources":["user-agent.composition.tsx"],"sourcesContent":["import React from 'react';\n\nexport const Logo = () => (\n <div style={{ height: '100%', display: 'flex', justifyContent: 'center' }}>\n <img style={{ width: 70 }} src=\"https://static.bit.dev/extensions-icons/user-agent.svg\" />\n </div>\n);\n"],"mappings":";;;;;;;;;AAAA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEO,MAAMA,IAAI,GAAG,mBAClB;EAAK,KAAK,EAAE;IAAEC,MAAM,EAAE,MAAV;IAAkBC,OAAO,EAAE,MAA3B;IAAmCC,cAAc,EAAE;EAAnD;AAAZ,gBACE;EAAK,KAAK,EAAE;IAAEC,KAAK,EAAE;EAAT,CAAZ;EAA2B,GAAG,EAAC;AAA/B,EADF,CADK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["UserAgentUI","provider","uiUi","userAgentUi","registerRenderHooks","serverInit","browser","userAgent","UAParser","connection","headers","browserInit","window","navigator","reactContext","UserAgentReactContext","UIAspect","UIRuntime","children","renderCtx","UserAgentAspect","addRuntime"],"sources":["user-agent.ui.runtime.tsx"],"sourcesContent":["import { UIAspect, UIRuntime, UiUI } from '@teambit/ui';\nimport React, { ReactNode } from 'react';\nimport UAParser from 'ua-parser-js';\nimport { UserAgentProvider } from '@teambit/ui-foundation.ui.hooks.use-user-agent';\nimport { UserAgentAspect } from './user-agent.aspect';\n\ntype UserAgentRenderCtx = {\n userAgent?: UAParser;\n};\n\n/**\n * user agent aspect\n */\nexport class UserAgentUI {\n static slots = [];\n\n static dependencies = [UIAspect];\n\n static runtime = UIRuntime;\n\n static async provider([uiUi]: [UiUI]) {\n const userAgentUi = new UserAgentUI();\n\n uiUi.registerRenderHooks<UserAgentRenderCtx, undefined>({\n serverInit: ({ browser }) => {\n const userAgent = new UAParser(browser?.connection.headers?.['user-agent']);\n return {\n userAgent,\n };\n },\n browserInit: () => {\n return {\n userAgent: new UAParser(window.navigator.userAgent),\n };\n },\n reactContext: UserAgentReactContext,\n });\n\n return userAgentUi;\n }\n}\n\nfunction UserAgentReactContext({ children, renderCtx }: { children: ReactNode; renderCtx?: UserAgentRenderCtx }) {\n return <UserA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;AACD;;AAEDE,4BAAA,CAAgBC,UAAhB,CAA2BrB,WAA3B"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/user-agent",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.424",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/ui-foundation/user-agent",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.ui-foundation",
|
|
8
8
|
"name": "user-agent",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.424"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"ua-parser-js": "0.7.24",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"core-js": "^3.0.0",
|
|
15
15
|
"@teambit/harmony": "0.3.3",
|
|
16
16
|
"@teambit/ui-foundation.ui.hooks.use-user-agent": "0.0.179",
|
|
17
|
-
"@teambit/ui": "0.0.
|
|
17
|
+
"@teambit/ui": "0.0.738"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/react": "^17.0.8",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_user-agent@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_user-agent@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_user-agent@0.0.424/dist/user-agent.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.ui-foundation_user-agent@0.0.424/dist/user-agent.docs.mdx')]
|
package/tsconfig.json
CHANGED
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"declaration": true,
|
|
16
16
|
"sourceMap": true,
|
|
17
17
|
"skipLibCheck": true,
|
|
18
|
+
"experimentalDecorators": true,
|
|
18
19
|
"outDir": "dist",
|
|
19
20
|
"moduleResolution": "node",
|
|
20
21
|
"esModuleInterop": true,
|
|
21
22
|
"rootDir": ".",
|
|
22
23
|
"resolveJsonModule": true,
|
|
23
24
|
"emitDeclarationOnly": true,
|
|
24
|
-
"experimentalDecorators": true,
|
|
25
25
|
"emitDecoratorMetadata": true,
|
|
26
26
|
"allowSyntheticDefaultImports": true,
|
|
27
27
|
"strictPropertyInitialization": false,
|
|
Binary file
|