@ably/ui 8.7.0-dev.6ce15a7 → 8.7.0-dev.80c4fae

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 (49) hide show
  1. package/README.md +1 -1
  2. package/core/.DS_Store +0 -0
  3. package/core/Code/component.css +3 -3
  4. package/core/Code/component.js +1 -1
  5. package/core/Code.jsx +328 -7145
  6. package/core/DropdownMenu/component.js +1 -0
  7. package/core/DropdownMenu.jsx +313 -0
  8. package/core/Flash.jsx +132 -57
  9. package/core/Logo.jsx +28 -113
  10. package/core/Meganav.jsx +180 -176
  11. package/core/MeganavContentDevelopers.jsx +13 -1
  12. package/core/MeganavContentUseCases.jsx +1 -1
  13. package/core/Notice/component.js +1 -1
  14. package/core/Notice/component.js.LICENSE.txt +0 -15
  15. package/core/Notice.jsx +133 -58
  16. package/core/images/ably-logo.png +0 -0
  17. package/core/sprites.svg +22 -1
  18. package/core/styles.css +2 -0
  19. package/package.json +3 -1
  20. package/src/core/.DS_Store +0 -0
  21. package/src/core/Code/component.css +1 -67
  22. package/src/core/Code/component.js +11 -46
  23. package/src/core/Code/component.jsx +7 -3
  24. package/src/core/DropdownMenu/component.js +0 -0
  25. package/src/core/DropdownMenu/component.jsx +112 -0
  26. package/src/core/FeatureFooter/component.html.erb +1 -1
  27. package/src/core/Flash/component.jsx +42 -14
  28. package/src/core/Logo/component.html.erb +2 -27
  29. package/src/core/Logo/component.jsx +7 -40
  30. package/src/core/Logo/component.rb +5 -4
  31. package/src/core/Meganav/component.html.erb +1 -1
  32. package/src/core/Meganav/component.jsx +1 -1
  33. package/src/core/Meganav/component.rb +1 -0
  34. package/src/core/MeganavContentDevelopers/component.html.erb +9 -0
  35. package/src/core/MeganavContentDevelopers/component.jsx +9 -0
  36. package/src/core/MeganavContentUseCases/component.html.erb +1 -1
  37. package/src/core/MeganavContentUseCases/component.jsx +1 -1
  38. package/src/core/MeganavSearchSuggestions/component.html.erb +1 -1
  39. package/src/core/core.rb +4 -0
  40. package/src/core/icons/github.svg +1 -1
  41. package/src/core/icons/google.svg +3 -0
  42. package/src/core/icons/icon-display-integrations-col.svg +8 -0
  43. package/src/core/icons/stackoverflow.svg +3 -0
  44. package/src/core/icons/youtube.svg +11 -0
  45. package/src/core/images/ably-logo.png +0 -0
  46. package/src/core/styles/properties.css +2 -0
  47. package/src/core/utils/syntax-highlighter-registry.js +61 -0
  48. package/src/core/utils/syntax-highlighter.css +69 -0
  49. package/src/core/utils/syntax-highlighter.js +98 -0
@@ -0,0 +1,112 @@
1
+ import React, { createContext, useContext, useState, useEffect, useRef } from "react";
2
+ import T from "prop-types";
3
+ import Icon from "../Icon/component.jsx";
4
+
5
+ const DropdownMenuContext = createContext();
6
+
7
+ const DropdownMenu = ({ children }) => {
8
+ const [isOpen, setOpen] = useState(false);
9
+ const ref = useRef(null);
10
+
11
+ useEffect(() => {
12
+ const clickHandler = (e) => {
13
+ if (ref?.current?.contains(e.target)) return;
14
+ setOpen(false);
15
+ };
16
+
17
+ document.addEventListener("click", clickHandler);
18
+
19
+ return () => {
20
+ document.removeEventListener("click", clickHandler);
21
+ };
22
+ }, []);
23
+
24
+ return (
25
+ <DropdownMenuContext.Provider value={{ isOpen, setOpen }}>
26
+ <div id="dropdown-menu" className="relative" ref={ref}>
27
+ {children}
28
+ </div>
29
+ </DropdownMenuContext.Provider>
30
+ );
31
+ };
32
+
33
+ DropdownMenu.propTypes = {
34
+ children: T.node,
35
+ };
36
+
37
+ const Trigger = ({ children, additionalTriggerCSS = "" }) => {
38
+ const { isOpen, setOpen } = useContext(DropdownMenuContext);
39
+
40
+ return (
41
+ <button
42
+ id="menu-trigger"
43
+ onClick={() => setOpen(!isOpen)}
44
+ className={`${additionalTriggerCSS} flex items-center p-8 ml-8 group hover:text-gui-hover hover:bg-light-grey active:text-gui-active focus:text-gui-focus focus:outline-none rounded-lg`}
45
+ >
46
+ <span className="leading-normal">{children}</span>
47
+ <Icon
48
+ name="icon-gui-disclosure-arrow"
49
+ color="text-cool-black"
50
+ size="1.25rem"
51
+ additionalCSS="transform rotate-90 group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"
52
+ />
53
+ </button>
54
+ );
55
+ };
56
+
57
+ Trigger.propTypes = {
58
+ children: T.node,
59
+ additionalTriggerCSS: T.string,
60
+ };
61
+
62
+ const Content = ({ children, anchorPosition = "right", additionalContentCSS }) => {
63
+ const { isOpen } = useContext(DropdownMenuContext);
64
+
65
+ if (!isOpen) {
66
+ return null;
67
+ }
68
+
69
+ const anchorPositionClasses = anchorPosition === "right" ? "right-0" : "left-0";
70
+
71
+ return (
72
+ <div
73
+ id="menu-content"
74
+ className={`${additionalContentCSS} absolute p-8 z-10 border border-mid-grey bg-white rounded shadow-container ${anchorPositionClasses}`}
75
+ style={{ minWidth: 275, top: 44 }}
76
+ >
77
+ {children}
78
+ </div>
79
+ );
80
+ };
81
+
82
+ Content.propTypes = {
83
+ children: T.node,
84
+ anchorPosition: T.string,
85
+ additionalContentCSS: T.string,
86
+ };
87
+
88
+ const Link = ({ url, title, subtitle, iconName, children }) => {
89
+ return (
90
+ <a href={url} className="menu-link group block p-8 hover:bg-light-grey hover:text-cool-black rounded">
91
+ <p className="mb-4">
92
+ {title}
93
+ {iconName ? <Icon name={iconName} size="1rem" color="text-cool-black" additionalCSS="align-middle ml-8 relative -top-1 -left-4" /> : null}
94
+ </p>
95
+ {subtitle ? <p className="text-p3 mb-16 text-dark-grey">{subtitle}</p> : null}
96
+ {children}
97
+ </a>
98
+ );
99
+ };
100
+
101
+ Link.propTypes = {
102
+ url: T.string,
103
+ title: T.string,
104
+ subtitle: T.string,
105
+ iconName: T.string,
106
+ children: T.node,
107
+ };
108
+
109
+ DropdownMenu.Trigger = Trigger;
110
+ DropdownMenu.Content = Content;
111
+ DropdownMenu.Link = Link;
112
+ export default DropdownMenu;
@@ -46,7 +46,7 @@
46
46
  </ul>
47
47
  </span>
48
48
  <span class="flex-0">
49
- <%= link_to 'Start with a free account', abs_url("/sign-up"), class: "ui-btn-secondary self-start mt-24" %>
49
+ <%= link_to 'Start building', abs_url("/sign-up"), class: "ui-btn-secondary self-start mt-24" %>
50
50
  </span>
51
51
  </div>
52
52
  </div>
@@ -1,6 +1,7 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
2
  import DOMPurify from "dompurify";
3
3
  import T from "prop-types";
4
+ import { nanoid } from "nanoid/non-secure";
4
5
 
5
6
  import { getRemoteDataStore } from "../remote-data-store";
6
7
  import ConnectStateWrapper from "../ConnectStateWrapper/component.jsx";
@@ -50,30 +51,45 @@ const FLASH_TEXT_COLOR = {
50
51
  const AUTO_HIDE = ["success", "info", "notice"];
51
52
  const AUTO_HIDE_TIME = 8000;
52
53
 
53
- const Flash = ({ type, content }) => {
54
- const ref = useRef(null);
55
- const [closed, setClosed] = useState(false);
56
- const [flashHeight, setFlashHeight] = useState(0);
57
- const [triggerEntryAnimation, setTriggerEntryAnimation] = useState(false);
54
+ const useAutoHide = (type, closeFlash) => {
55
+ const timeoutId = useRef(null);
58
56
 
59
- useEffect(() => setTriggerEntryAnimation(true), []);
60
57
  useEffect(() => {
61
58
  if (AUTO_HIDE.includes(type)) {
62
- setTimeout(() => {
63
- // closeFlash is idempotent, we can call it even if the flash has been already closed
59
+ timeoutId.current = setTimeout(() => {
64
60
  closeFlash();
65
61
  }, AUTO_HIDE_TIME);
66
62
  }
67
- }, [closed]);
63
+
64
+ return () => {
65
+ if (timeoutId.current) {
66
+ clearTimeout(timeoutId.current);
67
+ }
68
+ };
69
+ }, []);
70
+ };
71
+
72
+ const Flash = ({ id, type, content, removeFlash }) => {
73
+ const ref = useRef(null);
74
+ const [closed, setClosed] = useState(false);
75
+ const [flashHeight, setFlashHeight] = useState(0);
76
+ const [triggerEntryAnimation, setTriggerEntryAnimation] = useState(false);
68
77
 
69
78
  const closeFlash = () => {
70
79
  if (ref.current) {
71
80
  setFlashHeight(ref.current.getBoundingClientRect().height);
72
81
  }
73
82
 
74
- setTimeout(() => setClosed(true), 0);
83
+ setClosed(true);
84
+
85
+ setTimeout(() => {
86
+ removeFlash(id);
87
+ }, 100);
75
88
  };
76
89
 
90
+ useEffect(() => setTriggerEntryAnimation(true), []);
91
+ useAutoHide(type, closeFlash);
92
+
77
93
  const animateEntry = triggerEntryAnimation && !closed;
78
94
 
79
95
  let style;
@@ -123,13 +139,25 @@ Flash.propTypes = {
123
139
  };
124
140
 
125
141
  const Flashes = ({ flashes }) => {
126
- const items = flashes?.items || [];
142
+ const [flashesWithIds, setFlashesWithIds] = useState([]);
143
+
144
+ const removeFlash = (flashId) => setFlashesWithIds((items) => items.filter((item) => item.id !== flashId));
145
+
146
+ useEffect(() => {
147
+ setFlashesWithIds((state) => {
148
+ return [...state, ...(flashes?.items || []).map((flash) => ({ ...flash, id: nanoid(), removed: false }))];
149
+ });
150
+ }, [flashes]);
151
+
152
+ console.log({ flashesWithIds });
127
153
 
128
154
  return (
129
155
  <div className="ui-flash" data-id={FLASH_DATA_ID}>
130
- {items.map((flash) => (
131
- <Flash key={flash.type} {...flash} />
132
- ))}
156
+ {flashesWithIds
157
+ .filter((item) => !item.removed)
158
+ .map((flash) => (
159
+ <Flash removeFlash={removeFlash} key={flash.id} {...flash} />
160
+ ))}
133
161
  </div>
134
162
  );
135
163
  };
@@ -1,28 +1,3 @@
1
- <%= link_to logo_href, class: 'h-32' do %>
2
- <%= tag.svg class: ["transition-colors", "text-cool-black"], data: { id: data_id }, width: "108", height: "32", viewBox: "0 0 108 32", xmlns: "http://www.w3.org/2000/svg" do %>
3
- <path
4
- d="M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z"
5
- fill="currentColor"
6
- />
7
- <path d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" fill="url(#<%= gradient_id_0 %>)" />
8
- <path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(#<%= gradient_id_1 %>)" />
9
- <defs>
10
- <linearGradient id="<%= gradient_id_0 %>" x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
11
- <stop stop-color="#FF5416" />
12
- <stop offset="0.2535" stop-color="#FF5115" />
13
- <stop offset="0.461" stop-color="#FF4712" />
14
- <stop offset="0.6523" stop-color="#FF350E" />
15
- <stop offset="0.8327" stop-color="#FF1E08" />
16
- <stop offset="1" stop-color="#FF0000" />
17
- </linearGradient>
18
- <linearGradient id="<%= gradient_id_1 %>" x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
19
- <stop stop-color="#FF5416" />
20
- <stop offset="0.2535" stop-color="#FF5115" />
21
- <stop offset="0.461" stop-color="#FF4712" />
22
- <stop offset="0.6523" stop-color="#FF350E" />
23
- <stop offset="0.8327" stop-color="#FF1E08" />
24
- <stop offset="1" stop-color="#FF0000" />
25
- </linearGradient>
26
- </defs>
27
- <% end %>
1
+ <%= link_to logo_href, class: 'block', style: "height: 2.125rem", data: { id: data_id }, **additional_link_attrs do %>
2
+ <%= tag.img src: logo_url, width: "108px", alt: "Ably logo", **additional_img_attrs %>
28
3
  <% end %>
@@ -1,46 +1,10 @@
1
- import React, { useMemo } from "react";
1
+ import React from "react";
2
2
  import T from "prop-types";
3
- import { nanoid } from "nanoid/non-secure";
4
-
5
- const Logo = ({ dataId, href = "/" }) => {
6
- // This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
7
- // if it is hidden, the other instance will not show the ably shape from the logo.
8
-
9
- // This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
10
- // linearGradients defined in the other logo, and inherits the `hidden` style from the first.
11
- const gradientIds = useMemo(() => [nanoid(), nanoid()], []);
12
3
 
4
+ const Logo = ({ dataId, logoUrl, href = "/", additionalImgAttrs, additionalLinkAttrs }) => {
13
5
  return (
14
- <a href={href} className="h-32">
15
- <svg data-id={dataId} className="text-cool-black transition-colors" width="108" height="32" viewBox="0 0 108 32" xmlns="http://www.w3.org/2000/svg">
16
- <path
17
- d="M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z"
18
- fill="currentColor"
19
- />
20
- <path
21
- d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z"
22
- fill={`url(#${gradientIds[0]})`}
23
- />
24
- <path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill={`url(#${gradientIds[1]})`} />
25
- <defs>
26
- <linearGradient id={gradientIds[0]} x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
27
- <stop stopColor="#FF5416" />
28
- <stop offset="0.2535" stopColor="#FF5115" />
29
- <stop offset="0.461" stopColor="#FF4712" />
30
- <stop offset="0.6523" stopColor="#FF350E" />
31
- <stop offset="0.8327" stopColor="#FF1E08" />
32
- <stop offset="1" stopColor="#FF0000" />
33
- </linearGradient>
34
- <linearGradient id={gradientIds[1]} x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
35
- <stop stopColor="#FF5416" />
36
- <stop offset="0.2535" stopColor="#FF5115" />
37
- <stop offset="0.461" stopColor="#FF4712" />
38
- <stop offset="0.6523" stopColor="#FF350E" />
39
- <stop offset="0.8327" stopColor="#FF1E08" />
40
- <stop offset="1" stopColor="#FF0000" />
41
- </linearGradient>
42
- </defs>
43
- </svg>
6
+ <a href={href} data-id={dataId} className="block" style={{ height: "2.125rem" }} {...additionalLinkAttrs}>
7
+ <img src={logoUrl} width="108px" alt="Ably logo" {...additionalImgAttrs} />
44
8
  </a>
45
9
  );
46
10
  };
@@ -48,6 +12,9 @@ const Logo = ({ dataId, href = "/" }) => {
48
12
  Logo.propTypes = {
49
13
  dataId: T.string,
50
14
  href: T.string,
15
+ logoUrl: T.string,
16
+ additionalImgAttrs: T.object,
17
+ additionalLinkAttrs: T.object,
51
18
  };
52
19
 
53
20
  export default React.memo(Logo);
@@ -5,13 +5,14 @@ module AblyUi
5
5
  class Logo < ViewComponent::Base
6
6
  include AblyUi::Core::MeganavConfig
7
7
 
8
- attr_reader :href, :data_id, :gradient_id_0, :gradient_id_1
8
+ attr_reader :href, :logo_url, :data_id, :additional_img_attrs, :additional_link_attrs
9
9
 
10
- def initialize(data_id: '', href:)
10
+ def initialize(href:, logo_url:, data_id: '', additional_img_attrs: {}, additional_link_attrs: {})
11
11
  @data_id = data_id
12
12
  @href = href
13
- @gradient_id_0 = "paint_linear_#{SecureRandom.uuid}"
14
- @gradient_id_1 = "paint_linear_#{SecureRandom.uuid}"
13
+ @logo_url = logo_url
14
+ @additional_img_attrs = additional_img_attrs
15
+ @additional_link_attrs = additional_link_attrs
15
16
  end
16
17
 
17
18
  def logo_href
@@ -3,7 +3,7 @@
3
3
 
4
4
  <div class="ui-meganav ui-grid-px">
5
5
  <div className="mr-24">
6
- <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link)) %>
6
+ <%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link, logo_url: ably_logo)) %>
7
7
  </div>
8
8
  <%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %>
9
9
 
@@ -86,7 +86,7 @@ export default function Meganav({ paths, themeName = "white", notice, loginLink
86
86
  {notice && <Notice {...notice.props} config={notice.config} />}
87
87
  <div className="ui-meganav ui-grid-px">
88
88
  <div className="mr-24">
89
- <Logo dataId="meganav-logo" href={urlBase} />
89
+ <Logo dataId="meganav-logo" href={urlBase} logoUrl={paths.logo} />
90
90
  </div>
91
91
 
92
92
  <MeganavItemsDesktop panels={panels} paths={paths} theme={theme} absUrl={absUrl} />
@@ -6,6 +6,7 @@ module AblyUi
6
6
  class Meganav < ViewComponent::Base
7
7
  include MeganavConfig
8
8
  include Util
9
+ include SharedAssets
9
10
  attr_reader :options, :login_link, :logo_link, :url_base
10
11
 
11
12
  renders_one :notice, AblyUi::Core::Notice
@@ -56,6 +56,15 @@
56
56
  </div>
57
57
  <% end %>
58
58
  </li>
59
+ <li>
60
+ <%= link_to abs_url("/integrations"), class: "ui-meganav-media-with-image group" do %>
61
+ <%= render(AblyUi::Core::Icon.new(name: "icon-display-integrations-col", size: "2.5rem")) %>
62
+ <div class="flex flex-col justify-center">
63
+ <p class="ui-meganav-media-heading">Integrations</p>
64
+ <p class="ui-meganav-media-copy">Find out more about Ably integrations. </p>
65
+ </div>
66
+ <% end %>
67
+ </li>
59
68
  </ul>
60
69
  </div>
61
70
 
@@ -62,6 +62,15 @@ const MeganavContentDevelopers = ({ absUrl }) => (
62
62
  </div>
63
63
  </a>
64
64
  </li>
65
+ <li>
66
+ <a href={absUrl("/integrations")} className="ui-meganav-media-with-image group">
67
+ <Icon name="icon-display-integrations-col" size="2.5rem" />
68
+ <div className="flex flex-col justify-center">
69
+ <p className="ui-meganav-media-heading">Integrations</p>
70
+ <p className="ui-meganav-media-copy">Find out more about Ably integrations. </p>
71
+ </div>
72
+ </a>
73
+ </li>
65
74
  </ul>
66
75
  </div>
67
76
 
@@ -58,7 +58,7 @@
58
58
  </li>
59
59
  <li>
60
60
  <%= link_to abs_url("/solutions/fintech"), class: "ui-meganav-media group" do %>
61
- <p class="ui-meganav-media-heading">Fintech</p>
61
+ <p class="ui-meganav-media-heading">FinTech</p>
62
62
  <p class="ui-meganav-media-copy">Deliver personalised financial data in realtime.</p>
63
63
  <% end %>
64
64
  </li>
@@ -64,7 +64,7 @@ const MeganavContentUseCases = ({ absUrl }) => (
64
64
  </li>
65
65
  <li>
66
66
  <a href={absUrl("/solutions/fintech")} className="ui-meganav-media group">
67
- <p className="ui-meganav-media-heading">Fintech</p>
67
+ <p className="ui-meganav-media-heading">FinTech</p>
68
68
  <p className="ui-meganav-media-copy">Deliver personalised financial data in realtime.</p>
69
69
  </a>
70
70
  </li>
@@ -12,7 +12,7 @@
12
12
  <%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
13
13
  </li>
14
14
  <li class="py-12 pl-8 flex-shrink-0">
15
- <%= link_to 'Platform', abs_url("/docs/how-ably-works"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
15
+ <%= link_to 'Platform', abs_url("/platform"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
16
16
  </li>
17
17
  </ul>
18
18
 
package/src/core/core.rb CHANGED
@@ -30,6 +30,10 @@ module AblyUi
30
30
  end
31
31
 
32
32
  module SharedAssets
33
+ def ably_logo
34
+ asset_path 'ably_ui/core/images/ably-logo.png'
35
+ end
36
+
33
37
  def ably_stack_path
34
38
  asset_path 'ably_ui/core/images/ably-stack.svg'
35
39
  end
@@ -1,3 +1,3 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.4 0 0 5.41945 0 12.0432C0 17.3623 3.4 21.8785 8.2 23.4843C8.8 23.5846 9 23.1832 9 22.8821C9 22.581 9 21.8785 9 20.8749C5.7 21.5774 5 19.2692 5 19.2692C4.5 17.8641 3.7 17.4627 3.7 17.4627C2.6 16.7601 3.8 16.7602 3.8 16.7602C5 16.8605 5.6 17.9645 5.6 17.9645C6.7 19.771 8.4 19.2692 9.1 18.9681C9.2 18.1652 9.5 17.6634 9.9 17.3623C7.1 17.0612 4.3 16.0576 4.3 11.4411C4.3 10.1364 4.8 9.03242 5.5 8.22953C5.5 7.82809 5 6.62377 5.7 5.01801C5.7 5.01801 6.7 4.71693 9 6.22233C10 5.92125 11 5.82089 12 5.82089C13 5.82089 14 5.92125 15 6.22233C17.3 4.71693 18.3 5.01801 18.3 5.01801C19 6.72413 18.5 7.92845 18.4 8.22953C19.2 9.03242 19.6 10.1364 19.6 11.4411C19.6 16.0576 16.8 17.0612 14.1 17.3623C14.5 17.7638 14.9 18.4663 14.9 19.5702C14.9 21.176 14.9 22.4807 14.9 22.8821C14.9 23.1832 15.1 23.5846 15.7 23.4843C20.6 21.8785 24 17.3623 24 12.0432C24 5.41945 18.6 0 12 0Z" />
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 0C5.4 0 0 5.41945 0 12.0432C0 17.3623 3.4 21.8785 8.2 23.4843C8.8 23.5846 9 23.1832 9 22.8821C9 22.581 9 21.8785 9 20.8749C5.7 21.5774 5 19.2692 5 19.2692C4.5 17.8641 3.7 17.4627 3.7 17.4627C2.6 16.7601 3.8 16.7602 3.8 16.7602C5 16.8605 5.6 17.9645 5.6 17.9645C6.7 19.771 8.4 19.2692 9.1 18.9681C9.2 18.1652 9.5 17.6634 9.9 17.3623C7.1 17.0612 4.3 16.0576 4.3 11.4411C4.3 10.1364 4.8 9.03242 5.5 8.22953C5.5 7.82809 5 6.62377 5.7 5.01801C5.7 5.01801 6.7 4.71693 9 6.22233C10 5.92125 11 5.82089 12 5.82089C13 5.82089 14 5.92125 15 6.22233C17.3 4.71693 18.3 5.01801 18.3 5.01801C19 6.72413 18.5 7.92845 18.4 8.22953C19.2 9.03242 19.6 10.1364 19.6 11.4411C19.6 16.0576 16.8 17.0612 14.1 17.3623C14.5 17.7638 14.9 18.4663 14.9 19.5702C14.9 21.176 14.9 22.4807 14.9 22.8821C14.9 23.1832 15.1 23.5846 15.7 23.4843C20.6 21.8785 24 17.3623 24 12.0432C24 5.41945 18.6 0 12 0Z" fill="currentColor" />
3
3
  </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M17.6483 7.36875H9.1803V10.8492H14.0178C13.8092 11.9742 13.1764 12.9258 12.2225 13.5633C11.4162 14.1023 10.3873 14.4211 9.17795 14.4211C6.83655 14.4211 4.85608 12.8391 4.14827 10.7133C3.97014 10.1742 3.86702 9.59766 3.86702 9.00469C3.86702 8.41172 3.97014 7.83516 4.14827 7.29609C4.85842 5.17266 6.83889 3.59063 9.1803 3.59063C10.4998 3.59063 11.6834 4.04531 12.6162 4.93594L15.1944 2.35547C13.6358 0.902344 11.6037 0.0117188 9.1803 0.0117188C5.66702 0.0117188 2.62717 2.02734 1.14827 4.96641C0.538892 6.18047 0.192017 7.55391 0.192017 9.00703C0.192017 10.4602 0.538892 11.8312 1.14827 13.0453C2.62717 15.9844 5.66702 18 9.1803 18C11.6084 18 13.6428 17.1938 15.1287 15.8203C16.828 14.2547 17.81 11.9484 17.81 9.20859C17.81 8.57109 17.7537 7.95937 17.6483 7.36875Z" fill="currentColor" />
3
+ </svg>
@@ -0,0 +1,8 @@
1
+ <svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.69985 7.70029C3.40409 11.9961 3.18585 18.7426 7.21241 22.7692L11.9425 27.4993L27.4988 11.9429L22.7688 7.21285C18.7422 3.18629 11.9956 3.40453 7.69985 7.70029Z" stroke="#03020D" stroke-width="1.5" stroke-linejoin="round"/>
3
+ <path d="M45.2129 45.2131L42.3844 42.3847" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
4
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M40.4514 40.451C35.8956 45.0068 28.6731 45.2897 24.3219 40.9385L19.5918 36.2084C19.2989 35.9155 19.2989 35.4406 19.5918 35.1477L35.1482 19.5914C35.441 19.2985 35.9159 19.2985 36.2088 19.5914L40.9389 24.3215C45.2902 28.6727 45.0073 35.8952 40.4514 40.451Z" fill="#FF5416"/>
5
+ <path d="M2.78647 2.78662L7.73622 7.73637" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
6
+ <path d="M23.2925 16.2217L28.2423 21.1714" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
7
+ <path d="M16.2215 23.2927L21.1712 28.2425" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
8
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.8833 17.0404L6.44573 14.8304L6.89029 12.7367L17.3279 14.9467L16.8833 17.0404ZM17.4825 14.3457L7.81808 9.82876L8.72653 7.89014L18.391 12.4071L17.4825 14.3457ZM18.7002 11.9031L10.5048 5.05977L11.8771 3.41195L20.0726 10.2552L18.7002 11.9031ZM14.0806 1.27948L15.8009 0L22.1601 8.58804L20.4398 9.86753L14.0806 1.27948ZM16.8833 19.7351H6.25244V17.6026H16.8833V19.7351ZM21.1356 15.4701H19.0094V21.8675H4.12617V15.4701H2V24H21.1356V15.4701Z" fill="currentColor"/>
3
+ </svg>
@@ -0,0 +1,11 @@
1
+ <svg width="32" height="22" viewBox="0 0 32 22" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1509_18255)">
3
+ <path d="M30.525 3.44433C30.1655 2.09844 29.113 1.03726 27.778 0.6749C25.3391 0.00195312 15.5834 0.00195312 15.5834 0.00195312C15.5834 0.00195312 5.82773 0.00195312 3.38881 0.649017C2.0795 1.01137 1.00124 2.09844 0.64182 3.44433C0 5.90318 0 11.002 0 11.002C0 11.002 0 16.1268 0.64182 18.5597C1.00124 19.9056 2.05382 20.9668 3.38881 21.3292C5.8534 22.0021 15.5834 22.0021 15.5834 22.0021C15.5834 22.0021 25.3391 22.0021 27.778 21.3551C29.113 20.9927 30.1655 19.9315 30.525 18.5856C31.1668 16.1268 31.1668 11.0279 31.1668 11.0279C31.1668 11.0279 31.1925 5.90318 30.525 3.44433Z" fill="currentColor"/>
4
+ <path d="M20.5892 11.0021L12.4766 6.2915V15.7128L20.5892 11.0021Z" fill="white"/>
5
+ </g>
6
+ <defs>
7
+ <clipPath id="clip0_1509_18255">
8
+ <rect width="31.1667" height="22" fill="white"/>
9
+ </clipPath>
10
+ </defs>
11
+ </svg>
Binary file
@@ -47,6 +47,8 @@
47
47
  --icon-color-glassdoor: #0baa41;
48
48
  --icon-color-github: #000000;
49
49
  --icon-color-discord: #5865f2;
50
+ --icon-color-stackoverflow: #f48024;
51
+ --icon-color-youtube: #ff0000;
50
52
 
51
53
  --gradient-active-orange: linear-gradient(
52
54
  61.2deg,
@@ -0,0 +1,61 @@
1
+ // This file can be used in the browser, but because of the weight of all the language
2
+ // definitions, preferably it should be used on the server.
3
+
4
+ import bash from "highlight.js/lib/languages/bash";
5
+ import cpp from "highlight.js/lib/languages/cpp";
6
+ import csharp from "highlight.js/lib/languages/csharp";
7
+ import css from "highlight.js/lib/languages/css";
8
+ import dart from "highlight.js/lib/languages/dart";
9
+ import dos from "highlight.js/lib/languages/dos";
10
+ import diff from "highlight.js/lib/languages/diff";
11
+ import erlang from "highlight.js/lib/languages/erlang";
12
+ import elixir from "highlight.js/lib/languages/elixir";
13
+ import plaintext from "highlight.js/lib/languages/plaintext";
14
+ import go from "highlight.js/lib/languages/go";
15
+ import http from "highlight.js/lib/languages/http";
16
+ import java from "highlight.js/lib/languages/java";
17
+ import javascript from "highlight.js/lib/languages/javascript";
18
+ import typescript from "highlight.js/lib/languages/typescript";
19
+ import json from "highlight.js/lib/languages/json";
20
+ import objectivec from "highlight.js/lib/languages/objectivec";
21
+ import php from "highlight.js/lib/languages/php";
22
+ import python from "highlight.js/lib/languages/python";
23
+ import ruby from "highlight.js/lib/languages/ruby";
24
+ import swift from "highlight.js/lib/languages/swift";
25
+ import sql from "highlight.js/lib/languages/sql";
26
+ import xml from "highlight.js/lib/languages/xml";
27
+ import yaml from "highlight.js/lib/languages/yaml";
28
+ import curl from "highlightjs-curl/src/languages/curl";
29
+
30
+ const registry = [
31
+ { label: "Text", key: "text", module: plaintext },
32
+ { label: "JS", key: "javascript", module: javascript },
33
+ { label: "TS", key: "typescript", module: typescript },
34
+ { label: "Java", key: "java", module: java },
35
+ { label: "Ruby", key: "ruby", module: ruby },
36
+ { label: "Python", key: "python", module: python },
37
+ { label: "PHP", key: "php", module: php },
38
+ { label: "Shell", key: "bash", module: bash },
39
+ { label: "C#", key: "cs", module: csharp },
40
+ { label: "CSS", key: "css", module: css },
41
+ { label: "Go", key: "go", module: go },
42
+ { label: "HTML", key: "xml", module: xml },
43
+ { label: "HTTP", key: "http", module: http },
44
+ { label: "C++", key: "cpp", module: cpp },
45
+ { label: "Dart", key: "dart", module: dart },
46
+ { label: "Swift", key: "swift", module: swift },
47
+ { label: "Objective C", key: "objectivec", module: objectivec },
48
+ { label: "Node.js", key: "javascript", module: javascript },
49
+ { label: "JSON", key: "json", module: json },
50
+ { label: "DOS", key: "dos", module: dos },
51
+ { label: "YAML", key: "yaml", module: yaml },
52
+ { label: "Erlang", key: "erlang", module: erlang },
53
+ { label: "Elixir", key: "elixir", module: elixir },
54
+ { label: "Diff", key: "diff", module: diff },
55
+ { label: "SQL", key: "sql", module: sql },
56
+ { label: "cURL", key: "curl", module: curl },
57
+ { label: "HTML", key: "html", module: xml },
58
+ { label: "XML", key: "xml", module: xml },
59
+ ];
60
+
61
+ export default registry;
@@ -0,0 +1,69 @@
1
+ @layer base {
2
+ @import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,600;0,700;1,600;1,700&display=swap");
3
+ }
4
+
5
+ @layer components {
6
+ .hljs {
7
+ background: var(--syntax-black);
8
+ color: var(--syntax-light-grey);
9
+ }
10
+
11
+ .hljs-emphasis {
12
+ @apply italic;
13
+ }
14
+
15
+ .hljs-strong {
16
+ @apply font-bold;
17
+ }
18
+
19
+ .hljs-comment,
20
+ .hljs-quote {
21
+ color: var(--syntax-dark-grey);
22
+ }
23
+
24
+ .hljs-variable,
25
+ .hljs-template-variable,
26
+ .hljs-tag,
27
+ .hljs-name,
28
+ .hljs-selector-id,
29
+ .hljs-selector-class,
30
+ .hljs-regexp,
31
+ .hljs-deletion {
32
+ color: var(--syntax-red);
33
+ }
34
+
35
+ .hljs-number,
36
+ .hljs-built_in,
37
+ .hljs-literal,
38
+ .hljs-type,
39
+ .hljs-params,
40
+ .hljs-meta,
41
+ .hljs-link {
42
+ color: var(--syntax-orange);
43
+ }
44
+
45
+ .hljs-attribute {
46
+ color: var(--syntax-yellow);
47
+ }
48
+
49
+ .hljs-string,
50
+ .hljs-symbol,
51
+ .hljs-bullet,
52
+ .hljs-addition {
53
+ color: var(--syntax-green);
54
+ }
55
+
56
+ .hljs-title,
57
+ .hljs-section {
58
+ color: var(--syntax-blue);
59
+ }
60
+
61
+ .hljs-keyword,
62
+ .hljs-selector-tag {
63
+ color: var(--syntax-lilac);
64
+ }
65
+
66
+ .hljs-subst {
67
+ color: var(--syntax-mid-grey);
68
+ }
69
+ }