@arcanejs/toolkit-frontend 0.9.0 → 0.11.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,6 +1,6 @@
1
1
  export { i as code } from '../index-Db4cPoyC.js';
2
2
  import * as React from 'react';
3
- import React__default, { FC } from 'react';
3
+ import React__default, { FC, ReactElement, ReactNode } from 'react';
4
4
  import * as proto from '@arcanejs/protocol/core';
5
5
  import * as proto$1 from '@arcanejs/protocol';
6
6
  import { FrontendComponentRenderer } from '../types.js';
@@ -9,7 +9,7 @@ interface Props$8 {
9
9
  className?: string;
10
10
  info: proto.ButtonComponent;
11
11
  }
12
- declare const StyledButton: FC<Props$8>;
12
+ declare const Button: FC<Props$8>;
13
13
 
14
14
  type StageConnectionState = {
15
15
  state: 'connecting' | 'closed';
@@ -23,9 +23,15 @@ type StageConnectionState = {
23
23
  type StageContextData = {
24
24
  sendMessage: (<M extends proto$1.AnyClientComponentMessage>(msg: M) => void) | null;
25
25
  call: (<Namespace extends string, P, Action extends string & keyof P>(msg: proto$1.CallForPair<Namespace, P, Action>) => Promise<proto$1.ReturnForPair<P, Action>>) | null;
26
- renderComponent: (info: proto$1.AnyComponentProto) => JSX.Element;
26
+ renderComponent: (info: proto$1.AnyComponentProto) => ReactElement;
27
27
  connectionUuid: string | null;
28
28
  connection: StageConnectionState;
29
+ /**
30
+ * Estimated offset in milliseconds for how far ahead of the server clock
31
+ * the client clock is.
32
+ */
33
+ timeDifferenceMs: number | null;
34
+ lastPingMs: number | null;
29
35
  reconnect: () => void;
30
36
  };
31
37
  declare const StageContext: React.Context<StageContextData>;
@@ -39,21 +45,21 @@ declare const GroupStateWrapper: React__default.FunctionComponent<{
39
45
  * Whether new groups using `auto` should be open by default.
40
46
  */
41
47
  openByDefault: boolean;
42
- children: JSX.Element | JSX.Element[];
48
+ children: ReactNode;
43
49
  }>;
44
- declare const StyledGroup: FC<Props$7>;
50
+ declare const Group: FC<Props$7>;
45
51
 
46
52
  interface Props$6 {
47
53
  className?: string;
48
54
  info: proto.LabelComponent;
49
55
  }
50
- declare const StyledLabel: FC<Props$6>;
56
+ declare const Label: FC<Props$6>;
51
57
 
52
58
  type NestContentProps = {
53
59
  className?: string;
54
- children?: JSX.Element | JSX.Element[];
60
+ children?: ReactNode;
55
61
  };
56
- declare const StyledNestedContent: FC<NestContentProps>;
62
+ declare const NestedContent: FC<NestContentProps>;
57
63
 
58
64
  interface Props$5 {
59
65
  className?: string;
@@ -65,13 +71,13 @@ interface Props$4 {
65
71
  className?: string;
66
72
  info: proto.SliderButtonComponent;
67
73
  }
68
- declare const StyledSliderButton: FC<Props$4>;
74
+ declare const SliderButton: FC<Props$4>;
69
75
 
70
76
  interface Props$3 {
71
77
  className?: string;
72
78
  info: proto.SwitchComponent;
73
79
  }
74
- declare const StyledSwitch: FC<Props$3>;
80
+ declare const Switch: FC<Props$3>;
75
81
 
76
82
  interface Props$2 {
77
83
  info: proto.TabsComponent;
@@ -82,7 +88,7 @@ interface Props$1 {
82
88
  className?: string;
83
89
  info: proto.TextInputComponent;
84
90
  }
85
- declare const StyledTextInput: FC<Props$1>;
91
+ declare const TextInput: FC<Props$1>;
86
92
 
87
93
  interface Props {
88
94
  className?: string;
@@ -92,4 +98,4 @@ declare const Timeline: FC<Props>;
92
98
 
93
99
  declare const CORE_FRONTEND_COMPONENT_RENDERER: FrontendComponentRenderer;
94
100
 
95
- export { StyledButton as Button, CORE_FRONTEND_COMPONENT_RENDERER, StyledGroup as Group, GroupStateWrapper, StyledLabel as Label, StyledNestedContent as NestedContent, Rect, StyledSliderButton as SliderButton, type StageConnectionState, StageContext, type StageContextData, StyledSwitch as Switch, Tabs, StyledTextInput as TextInput, Timeline };
101
+ export { Button, CORE_FRONTEND_COMPONENT_RENDERER, Group, GroupStateWrapper, Label, NestedContent, Rect, SliderButton, type StageConnectionState, StageContext, type StageContextData, Switch, Tabs, TextInput, Timeline };