@xyd-js/storybook 0.0.1-xyd.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.
Files changed (141) hide show
  1. package/.storybook/main.ts +59 -0
  2. package/.storybook/preview.ts +30 -0
  3. package/.storybook/styles.css +5 -0
  4. package/CHANGELOG.md +12 -0
  5. package/README.md +50 -0
  6. package/eslint.config.js +28 -0
  7. package/package.json +50 -0
  8. package/src/content/Icons.tsx +83 -0
  9. package/src/content/code-sample.mdx +15 -0
  10. package/src/content/hello-world.mdx +116 -0
  11. package/src/docs/atlas/Atlas.stories.tsx +47 -0
  12. package/src/docs/atlas/todo-app.uniform.json +625 -0
  13. package/src/docs/atlas/uniform-to-references.ts +101 -0
  14. package/src/docs/components/brand/Button.stories.tsx +32 -0
  15. package/src/docs/components/brand/CTABanner.stories.tsx +36 -0
  16. package/src/docs/components/coder/CodeSample.stories.tsx +26 -0
  17. package/src/docs/components/writer/Badge.stories.tsx +32 -0
  18. package/src/docs/components/writer/Breadcrumbs.stories.tsx +34 -0
  19. package/src/docs/components/writer/Callout.stories.tsx +25 -0
  20. package/src/docs/components/writer/GuideCard.stories.tsx +151 -0
  21. package/src/docs/components/writer/Heading.stories.tsx +52 -0
  22. package/src/docs/components/writer/NavLinks.stories.tsx +31 -0
  23. package/src/docs/components/writer/Pre.stories.tsx +23 -0
  24. package/src/docs/components/writer/Steps.stories.tsx +27 -0
  25. package/src/docs/components/writer/Table.stories.tsx +54 -0
  26. package/src/docs/templates/CodeSample.stories.tsx +15 -0
  27. package/src/docs/themes/logo.tsx +37 -0
  28. package/src/docs/themes/themes-designsystem.stories.tsx +156 -0
  29. package/src/docs/themes/themes.stories.tsx +261 -0
  30. package/src/docs/ui/Nav.stories.tsx +58 -0
  31. package/src/docs/ui/Sidebar.stories.tsx +161 -0
  32. package/src/docs/ui/SubNav.stories.tsx +29 -0
  33. package/src/utils/mdx.ts +31 -0
  34. package/storybook-static/assets/Atlas.stories-CXIW65Hs.js +255 -0
  35. package/storybook-static/assets/Badge.stories-xjDbGZ5c.js +21 -0
  36. package/storybook-static/assets/Breadcrumbs.stories-DUn-OgPN.js +21 -0
  37. package/storybook-static/assets/Button.stories-BUAUswSC.js +21 -0
  38. package/storybook-static/assets/CTABanner-7_fa6QIU-6vh6ca3a.js +4 -0
  39. package/storybook-static/assets/CTABanner.stories-D5CtnW6h.js +22 -0
  40. package/storybook-static/assets/Callout.stories-DonqcNeI.js +16 -0
  41. package/storybook-static/assets/CodeSample.stories-4-beIs6I.js +22 -0
  42. package/storybook-static/assets/CodeSample.stories-B8_z15cp.js +8 -0
  43. package/storybook-static/assets/Color-F6OSRLHC-D5TfMBnc.js +1 -0
  44. package/storybook-static/assets/DocsRenderer-CFRXHY34-BrPAHo60.js +730 -0
  45. package/storybook-static/assets/GuideCard.stories-B8wFh9oh.js +65 -0
  46. package/storybook-static/assets/Heading.stories-D82-EGrg.js +40 -0
  47. package/storybook-static/assets/Nav.stories-CM_STIcN.js +13 -0
  48. package/storybook-static/assets/NavLinks.stories-D0QuD0H3.js +19 -0
  49. package/storybook-static/assets/Pre.stories-1WB_X0Ix.js +11 -0
  50. package/storybook-static/assets/Sidebar.stories-CwyChgiy.js +9 -0
  51. package/storybook-static/assets/Steps.stories-gANyLY_H.js +16 -0
  52. package/storybook-static/assets/SubNav.stories-D5TbjJj2.js +19 -0
  53. package/storybook-static/assets/Table.stories-BSZMHwDX.js +43 -0
  54. package/storybook-static/assets/UnderlineNav-C0OvjpyZ-D7c5zIhU.js +41 -0
  55. package/storybook-static/assets/_rollupPluginBabelHelpers-CAjWVhpp-BWJe-8U1.js +4 -0
  56. package/storybook-static/assets/browser.esm-BOPNWGdv.js +20 -0
  57. package/storybook-static/assets/chevron-right-Dfa2nijf.js +31 -0
  58. package/storybook-static/assets/chunk-K6AXKMTT-DXBwE8Vx.js +12 -0
  59. package/storybook-static/assets/chunk-XP5HYGXS-DH4vAeCa.js +1 -0
  60. package/storybook-static/assets/client-jctswkVR.js +25 -0
  61. package/storybook-static/assets/content-DfDGXctA.js +8 -0
  62. package/storybook-static/assets/entry-preview-Com-SXI0.js +10 -0
  63. package/storybook-static/assets/entry-preview-docs-Bs0lZRn3.js +47 -0
  64. package/storybook-static/assets/entry-preview-rsc-56ExrKd2.js +1 -0
  65. package/storybook-static/assets/iframe-B0k8DGQG.js +2 -0
  66. package/storybook-static/assets/index-B-gRCko5.js +1 -0
  67. package/storybook-static/assets/index-B0Jt8usF.js +9 -0
  68. package/storybook-static/assets/index-CBUcM4bS.js +8 -0
  69. package/storybook-static/assets/index-CC-8bvy6.js +9 -0
  70. package/storybook-static/assets/index-CQ7VjfMi.js +1 -0
  71. package/storybook-static/assets/index-Cu4lwwaE.js +1 -0
  72. package/storybook-static/assets/index-DIXNDbo9.js +1 -0
  73. package/storybook-static/assets/index-D_kIG38s.js +1 -0
  74. package/storybook-static/assets/index-DthG7GmK.js +17 -0
  75. package/storybook-static/assets/index-ogSvIofg.js +6 -0
  76. package/storybook-static/assets/jsx-runtime-C-_spy54.js +9 -0
  77. package/storybook-static/assets/layouts-CHVz-oC2.js +15 -0
  78. package/storybook-static/assets/preview--rrl-Bev.js +234 -0
  79. package/storybook-static/assets/preview-B3PTUHS7.js +1 -0
  80. package/storybook-static/assets/preview-CFgKly6U.js +1 -0
  81. package/storybook-static/assets/preview-CsjPNNCI.js +1 -0
  82. package/storybook-static/assets/preview-DFfOCnyz.css +1 -0
  83. package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
  84. package/storybook-static/assets/preview-DY_pW_WS.js +396 -0
  85. package/storybook-static/assets/preview-NdwLIjRI.js +2 -0
  86. package/storybook-static/assets/preview-RFMnorYX.js +1 -0
  87. package/storybook-static/assets/preview-Zk6Lo_wo.js +1 -0
  88. package/storybook-static/assets/preview-iUmqt_lp.js +34 -0
  89. package/storybook-static/assets/react-18-C4NQogKe.js +1 -0
  90. package/storybook-static/assets/themes-designsystem.stories-DyoY6VQ9.js +11 -0
  91. package/storybook-static/assets/themes.stories-BUr1Iju1.js +41 -0
  92. package/storybook-static/assets/writer-BQ7yPg-n.js +4 -0
  93. package/storybook-static/favicon.svg +1 -0
  94. package/storybook-static/iframe.html +639 -0
  95. package/storybook-static/index.html +186 -0
  96. package/storybook-static/index.json +1 -0
  97. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  98. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  99. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  100. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  101. package/storybook-static/project.json +1 -0
  102. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js +331 -0
  103. package/storybook-static/sb-addons/chromatic-com-storybook-10/manager-bundle.js.LEGAL.txt +51 -0
  104. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js +3 -0
  105. package/storybook-static/sb-addons/essentials-actions-4/manager-bundle.js.LEGAL.txt +0 -0
  106. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js +12 -0
  107. package/storybook-static/sb-addons/essentials-backgrounds-5/manager-bundle.js.LEGAL.txt +0 -0
  108. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js +391 -0
  109. package/storybook-static/sb-addons/essentials-controls-3/manager-bundle.js.LEGAL.txt +0 -0
  110. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js +3 -0
  111. package/storybook-static/sb-addons/essentials-measure-8/manager-bundle.js.LEGAL.txt +0 -0
  112. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js +3 -0
  113. package/storybook-static/sb-addons/essentials-outline-9/manager-bundle.js.LEGAL.txt +0 -0
  114. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js +3 -0
  115. package/storybook-static/sb-addons/essentials-toolbars-7/manager-bundle.js.LEGAL.txt +0 -0
  116. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js +3 -0
  117. package/storybook-static/sb-addons/essentials-viewport-6/manager-bundle.js.LEGAL.txt +0 -0
  118. package/storybook-static/sb-addons/interactions-11/manager-bundle.js +210 -0
  119. package/storybook-static/sb-addons/interactions-11/manager-bundle.js.LEGAL.txt +0 -0
  120. package/storybook-static/sb-addons/links-2/manager-bundle.js +3 -0
  121. package/storybook-static/sb-addons/links-2/manager-bundle.js.LEGAL.txt +0 -0
  122. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +127 -0
  123. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js.LEGAL.txt +12 -0
  124. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  125. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  126. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  127. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  128. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  129. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  130. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  131. package/storybook-static/sb-manager/globals-module-info.js +1028 -0
  132. package/storybook-static/sb-manager/globals-runtime.js +40861 -0
  133. package/storybook-static/sb-manager/globals.js +48 -0
  134. package/storybook-static/sb-manager/runtime.js +13338 -0
  135. package/storybook-static/sb-preview/globals.js +33 -0
  136. package/storybook-static/sb-preview/runtime.js +7174 -0
  137. package/tsconfig.app.json +24 -0
  138. package/tsconfig.json +17 -0
  139. package/tsconfig.node.json +13 -0
  140. package/tsconfig.tsbuildinfo +1 -0
  141. package/vite.config.ts +8 -0
@@ -0,0 +1,59 @@
1
+ import type {StorybookConfig} from "@storybook/react-vite";
2
+ import remarkGfm from 'remark-gfm';
3
+ import {visit} from 'unist-util-visit';
4
+
5
+ import {join, dirname} from "path";
6
+
7
+ /**
8
+ * This function is used to resolve the absolute path of a package.
9
+ * It is needed in projects that use Yarn PnP or are set up within a monorepo.
10
+ */
11
+ function getAbsolutePath(value: string): any {
12
+ return dirname(require.resolve(join(value, "package.json")));
13
+ }
14
+
15
+ function remarkInjectMeta() { // TODO: move to @xyd-js/content
16
+ return (tree) => {
17
+ visit(tree, 'code', (node) => {
18
+ if (node.meta) {
19
+ node.data = node.data || {};
20
+ node.data.hProperties = {
21
+ ...(node.data.hProperties || {}),
22
+ meta: node.meta,
23
+ };
24
+ }
25
+ });
26
+ };
27
+ }
28
+
29
+ const config: StorybookConfig = {
30
+ stories: ["../src/docs/**/*.mdx", "../src/docs/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
31
+ addons: [
32
+ getAbsolutePath("@storybook/addon-onboarding"),
33
+ getAbsolutePath("@storybook/addon-links"),
34
+ getAbsolutePath("@storybook/addon-essentials"),
35
+ getAbsolutePath("@chromatic-com/storybook"),
36
+ getAbsolutePath("@storybook/addon-interactions"),
37
+ {
38
+ name: '@storybook/addon-docs',
39
+ options: {
40
+ mdxPluginOptions: {
41
+ mdxCompileOptions: {
42
+ remarkPlugins: [
43
+ remarkGfm,
44
+ remarkInjectMeta
45
+ ],
46
+ },
47
+ },
48
+ },
49
+ },
50
+ ],
51
+ framework: {
52
+ name: getAbsolutePath("@storybook/react-vite"),
53
+ options: {},
54
+ },
55
+ features: {
56
+ experimentalRSC: true,
57
+ }
58
+ };
59
+ export default config;
@@ -0,0 +1,30 @@
1
+ import type {Preview} from "@storybook/react";
2
+
3
+ import "@xyd-js/atlas/index.css"
4
+ import "@xyd-js/fable-wiki/theme.css"
5
+
6
+ import './styles.css'
7
+
8
+ const preview: Preview = {
9
+ parameters: {
10
+ options: {
11
+ storySort: {
12
+ order: [
13
+ 'Atlas',
14
+ 'Components', ['Writer', 'Coder'],
15
+ 'UI',
16
+ 'Layouts',
17
+ 'Themes', ['Default', 'Design System'],
18
+ ], // TODO: nested sorting
19
+ },
20
+ },
21
+ controls: {
22
+ matchers: {
23
+ color: /(background|color)$/i,
24
+ date: /Date$/i,
25
+ },
26
+ },
27
+ },
28
+ };
29
+
30
+ export default preview;
@@ -0,0 +1,5 @@
1
+ :root {
2
+ --headingEffect-color-tertiary: rgba(23, 119, 184, 0.5);
3
+ --headingEffect-color-secondary: rgb(121, 85, 241);
4
+ --headingEffect-color-primary: rgb(255, 105, 180);
5
+ }
package/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ # @xyd-js/storybook
2
+
3
+ ## 0.0.1-xyd.0
4
+
5
+ ### Patch Changes
6
+
7
+ - initial changeset bump
8
+ - Updated dependencies
9
+ - @xyd-js/atlas@0.1.0-xyd.7
10
+ - @xyd-js/components@0.1.0-xyd.1
11
+ - @xyd-js/ui@0.1.0-xyd.7
12
+ - @xyd-js/fable-wiki@0.1.0-xyd.4
package/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # React + TypeScript + Vite
2
+
3
+ This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
+
5
+ Currently, two official plugins are available:
6
+
7
+ - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
8
+ - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
9
+
10
+ ## Expanding the ESLint configuration
11
+
12
+ If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
13
+
14
+ - Configure the top-level `parserOptions` property like this:
15
+
16
+ ```js
17
+ export default tseslint.config({
18
+ languageOptions: {
19
+ // other options...
20
+ parserOptions: {
21
+ project: ['./tsconfig.node.json', './tsconfig.app.json'],
22
+ tsconfigRootDir: import.meta.dirname,
23
+ },
24
+ },
25
+ })
26
+ ```
27
+
28
+ - Replace `tseslint.configs.recommended` to `tseslint.configs.recommendedTypeChecked` or `tseslint.configs.strictTypeChecked`
29
+ - Optionally add `...tseslint.configs.stylisticTypeChecked`
30
+ - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and update the config:
31
+
32
+ ```js
33
+ // eslint.config.js
34
+ import react from 'eslint-plugin-react'
35
+
36
+ export default tseslint.config({
37
+ // Set the react version
38
+ settings: { react: { version: '18.3' } },
39
+ plugins: {
40
+ // Add the react plugin
41
+ react,
42
+ },
43
+ rules: {
44
+ // other rules...
45
+ // Enable its recommended rules
46
+ ...react.configs.recommended.rules,
47
+ ...react.configs['jsx-runtime'].rules,
48
+ },
49
+ })
50
+ ```
@@ -0,0 +1,28 @@
1
+ import js from '@eslint/js'
2
+ import globals from 'globals'
3
+ import reactHooks from 'eslint-plugin-react-hooks'
4
+ import reactRefresh from 'eslint-plugin-react-refresh'
5
+ import tseslint from 'typescript-eslint'
6
+
7
+ export default tseslint.config(
8
+ { ignores: ['dist'] },
9
+ {
10
+ extends: [js.configs.recommended, ...tseslint.configs.recommended],
11
+ files: ['**/*.{ts,tsx}'],
12
+ languageOptions: {
13
+ ecmaVersion: 2020,
14
+ globals: globals.browser,
15
+ },
16
+ plugins: {
17
+ 'react-hooks': reactHooks,
18
+ 'react-refresh': reactRefresh,
19
+ },
20
+ rules: {
21
+ ...reactHooks.configs.recommended.rules,
22
+ 'react-refresh/only-export-components': [
23
+ 'warn',
24
+ { allowConstantExport: true },
25
+ ],
26
+ },
27
+ },
28
+ )
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@xyd-js/storybook",
3
+ "version": "0.0.1-xyd.0",
4
+ "type": "module",
5
+ "dependencies": {
6
+ "@mdx-js/react": "^3.0.1",
7
+ "@mdx-js/rollup": "^3.0.1",
8
+ "react": "^19.0.0",
9
+ "react-dom": "^19.0.0",
10
+ "remark-gfm": "^4.0.0",
11
+ "@xyd-js/components": "0.1.0-xyd.1",
12
+ "@xyd-js/atlas": "0.1.0-xyd.7",
13
+ "@xyd-js/fable-wiki": "0.1.0-xyd.4",
14
+ "@xyd-js/ui": "0.1.0-xyd.7"
15
+ },
16
+ "devDependencies": {
17
+ "@chromatic-com/storybook": "^1.9.0",
18
+ "@eslint/js": "^9.11.1",
19
+ "@storybook/addon-essentials": "^8.3.5",
20
+ "@storybook/addon-interactions": "^8.3.5",
21
+ "@storybook/addon-links": "^8.3.5",
22
+ "@storybook/addon-onboarding": "^8.3.5",
23
+ "@storybook/blocks": "^8.3.5",
24
+ "@storybook/react": "^8.3.5",
25
+ "@storybook/react-vite": "^8.3.5",
26
+ "@storybook/test": "^8.3.5",
27
+ "@types/react": "^19.0.0",
28
+ "@types/react-dom": "^19.0.0",
29
+ "@vitejs/plugin-react": "^4.3.2",
30
+ "eslint": "^9.11.1",
31
+ "eslint-plugin-react-hooks": "^5.1.0-rc.0",
32
+ "eslint-plugin-react-refresh": "^0.4.12",
33
+ "eslint-plugin-storybook": "^0.9.0",
34
+ "globals": "^15.9.0",
35
+ "storybook": "^8.3.5",
36
+ "typescript": "^5.5.3",
37
+ "typescript-eslint": "^8.7.0",
38
+ "vite": "^5.4.8"
39
+ },
40
+ "eslintConfig": {
41
+ "extends": [
42
+ "plugin:storybook/recommended"
43
+ ]
44
+ },
45
+ "scripts": {
46
+ "dev": "storybook dev -p 6006",
47
+ "build": "storybook build",
48
+ "lint": "eslint ."
49
+ }
50
+ }
@@ -0,0 +1,83 @@
1
+ import React from "react";
2
+
3
+ export function IconSessionReplay() {
4
+ return <svg
5
+ width={24}
6
+ height={24}
7
+ viewBox="0 0 24 24"
8
+ fill="none"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ >
11
+ <path
12
+ d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
13
+ stroke="black"
14
+ strokeWidth={2}
15
+ strokeLinecap="round"
16
+ strokeLinejoin="round"
17
+ />
18
+ <path
19
+ d="M10 8L16 12L10 16V8Z"
20
+ stroke="black"
21
+ strokeWidth={2}
22
+ strokeLinecap="round"
23
+ strokeLinejoin="round"
24
+ />
25
+ </svg>
26
+ }
27
+
28
+ export function IconMetrics() {
29
+ return <svg
30
+ width={24}
31
+ height={24}
32
+ viewBox="0 0 24 24"
33
+ fill="none"
34
+ xmlns="http://www.w3.org/2000/svg"
35
+ >
36
+ <path
37
+ d="M21 7L13.2273 14.9167L9.13636 10.75L3 17"
38
+ stroke="black"
39
+ strokeWidth={2}
40
+ strokeLinecap="round"
41
+ strokeLinejoin="round"
42
+ />
43
+ <path
44
+ d="M16 7H21V12"
45
+ stroke="black"
46
+ strokeWidth={2}
47
+ strokeLinecap="round"
48
+ strokeLinejoin="round"
49
+ />
50
+ </svg>
51
+ }
52
+
53
+ export function IconFunnels() {
54
+ return <svg
55
+ width={24}
56
+ height={24}
57
+ viewBox="0 0 24 24"
58
+ fill="none"
59
+ xmlns="http://www.w3.org/2000/svg"
60
+ >
61
+ <path
62
+ d="M12 20L12 10"
63
+ stroke="black"
64
+ strokeWidth={2}
65
+ strokeLinecap="round"
66
+ strokeLinejoin="round"
67
+ />
68
+ <path
69
+ d="M6 20L6 4"
70
+ stroke="black"
71
+ strokeWidth={2}
72
+ strokeLinecap="round"
73
+ strokeLinejoin="round"
74
+ />
75
+ <path
76
+ d="M18 20L18 16"
77
+ stroke="black"
78
+ strokeWidth={2}
79
+ strokeLinecap="round"
80
+ strokeLinejoin="round"
81
+ />
82
+ </svg>
83
+ }
@@ -0,0 +1,15 @@
1
+ ```js Track User Events
2
+ // !mark
3
+ import ls from " @livesession/sdk";
4
+
5
+ ls.init("123456789", { keystrokes: true, rootHostname: ".mypage.com" });
6
+
7
+ // !bg[11:25]
8
+ ls.track("User Subscribed", {
9
+ // !mark(1:4)
10
+ plan: "premium",
11
+ seats: 1,
12
+ total: 255.50,
13
+ isPatron: true
14
+ });
15
+ ```
@@ -0,0 +1,116 @@
1
+ import {
2
+ Callout,
3
+ Details,
4
+ Steps,
5
+ Tabs,
6
+ GuideCard
7
+ } from '@xyd-js/components/writer';
8
+
9
+ import {
10
+ IconSessionReplay,
11
+ IconMetrics,
12
+ IconFunnels
13
+ } from "./Icons";
14
+
15
+ # Product Analytics
16
+ ### Learn how to analyze user behavior to optimize your product.
17
+
18
+ LiveSession provides comprehensive APIs to analyze user interactions within your product, enabling you to gain actionable insights. Whether you're optimizing user flows, identifying drop-offs, or validating feature adoption, our tools empower you to make data-driven decisions.
19
+
20
+ ### Quickstart
21
+
22
+ To get started with product analytics, you can use the session recording and event tracking endpoints in the REST API, as shown in the examples below. You can either use the [REST API](https://livesession.com/docs/api) from your preferred HTTP client or utilize our official SDKs for popular programming languages.
23
+
24
+ <Callout>
25
+ Start analyzing user sessions today using LiveSession's intuitive tools. Sign up to unlock a 14-day free trial and
26
+ see the impact of real-time insights.
27
+ </Callout>
28
+
29
+ > Leverage LiveSession's real-time analytics to enhance your product and user experience.
30
+
31
+ Here are a few examples of how LiveSession can improve your product workflows:
32
+
33
+ <Steps>
34
+ <Steps.Item>
35
+ **Identifying bottlenecks:** Detect areas where users struggle within your app, such as confusing UI elements or
36
+ lengthy onboarding steps.
37
+ </Steps.Item>
38
+ <Steps.Item>
39
+ **Improving feature adoption:** Analyze which features are underutilized and develop strategies to improve their
40
+ discoverability.
41
+ </Steps.Item>
42
+ <Steps.Item>
43
+ **Reducing churn:** Use behavioral data to identify churn risks and proactively address user pain points.
44
+ </Steps.Item>
45
+ <Steps.Item>
46
+ **Optimizing conversion rates:** Track and analyze key user journeys to increase your product's conversion
47
+ rates.
48
+ </Steps.Item>
49
+ </Steps>
50
+
51
+ #### API Features
52
+ Our analytics tools are designed for seamless integration and powerful insights:
53
+
54
+ <div>
55
+ <Details label="Session Replay">
56
+ LiveSession offers detailed session replays, allowing you to visualize user interactions in your product.
57
+ </Details>
58
+ <Details label="Custom Events">
59
+ Track custom events tailored to your specific business needs for deeper analytics.
60
+ </Details>
61
+ </div>
62
+
63
+ <div>
64
+ <Details kind="secondary" title="Learn More" label="Advanced Features">
65
+ Dive deeper into advanced analytics, including segmentation, funnel analysis, and heatmaps.
66
+ </Details>
67
+ </div>
68
+
69
+ #### Example Use Cases
70
+ <Tabs items={["User Behavior", "Feature Adoption", "Churn Analysis"]}>
71
+ <Tabs.Content value="User Behavior">
72
+ Gain insights into user behavior by replaying sessions and analyzing click patterns. This helps uncover friction
73
+ points in your app's user experience.
74
+ </Tabs.Content>
75
+ <Tabs.Content value="Feature Adoption">
76
+ Understand how users engage with new features. Track metrics like time to adoption and overall usage to measure
77
+ feature success.
78
+ </Tabs.Content>
79
+ <Tabs.Content value="Churn Analysis">
80
+ Use session data to identify behavioral patterns of users who are at risk of churning and implement targeted
81
+ retention strategies.
82
+ </Tabs.Content>
83
+ </Tabs>
84
+
85
+ ```js Track User Events
86
+ import ls from " @livesession/sdk";
87
+
88
+ ls.init("123456789", { keystrokes: true, rootHostname: ".mypage.com" });
89
+
90
+ ls.track("User Subscribed", {
91
+ plan: "premium",
92
+ seats: 1,
93
+ total: 255.50,
94
+ isPatron: true
95
+ });
96
+ ```
97
+
98
+ ## Next Steps
99
+
100
+ <GuideCard
101
+ icon={<IconSessionReplay/>}
102
+ title="Session Replay"
103
+ body="Visualize user interactions in your product with detailed session replays."
104
+ />
105
+
106
+ <GuideCard
107
+ icon={<IconMetrics/>}
108
+ title="Metrics Analysis"
109
+ body="Analyze key metrics to understand user behavior and optimize your product workflows."
110
+ />
111
+
112
+ <GuideCard
113
+ icon={<IconFunnels/>}
114
+ title="Funnel Analysis"
115
+ body="Track user journeys and identify drop-offs to optimize conversion rates."
116
+ />
@@ -0,0 +1,47 @@
1
+ import React, {useState, useEffect} from 'react';
2
+ import type {Meta} from '@storybook/react';
3
+
4
+ import {Reference} from '@xyd-js/uniform';
5
+ import {Atlas} from "@xyd-js/atlas";
6
+
7
+ import {uniformToReferences} from "./uniform-to-references";
8
+ import {MDXReference} from "../../utils/mdx.ts";
9
+
10
+ const HelloWorld = () => {
11
+ return <h1>Hello, World!</h1>;
12
+ };
13
+
14
+ export default {
15
+ title: 'Atlas/Atlas',
16
+ component: HelloWorld,
17
+ } as Meta;
18
+
19
+ // const Template = (args) => <Atlas/>;
20
+
21
+ const Template = (args) => {
22
+ const [references, setReferences] = useState<MDXReference<Reference[]> | []>([])
23
+
24
+ async function load() {
25
+ const resp = await uniformToReferences()
26
+ if (resp && resp.length) {
27
+ setReferences(resp)
28
+ }
29
+ }
30
+
31
+ useEffect(() => {
32
+ load()
33
+ }, [])
34
+
35
+ return <div style={{
36
+ width: "1200px",
37
+ display: "flex",
38
+ alignItems: "center",
39
+ flexDirection: "column",
40
+ margin: "0 auto"
41
+ }}>
42
+ <Atlas references={references}/>
43
+ </div>
44
+ }
45
+
46
+ export const Default = Template.bind({});
47
+ Default.args = {};