@dxos/brand 0.6.10-main.3cfcc89 → 0.6.10-main.bbdfaa4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/brand",
3
- "version": "0.6.10-main.3cfcc89",
3
+ "version": "0.6.10-main.bbdfaa4",
4
4
  "description": "DXOS brand assets.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -23,12 +23,11 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "d3": "^7.9.0",
26
- "@dxos/react-ui-theme": "0.6.10-main.3cfcc89"
26
+ "@dxos/react-ui-theme": "0.6.10-main.bbdfaa4"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@fontsource/k2d": "^5.0.18",
30
30
  "@phosphor-icons/react": "^2.1.5",
31
- "@rive-app/react-canvas": "^4.14.0",
32
31
  "@storybook/addons": "^7.0.6",
33
32
  "@storybook/api": "^7.0.6",
34
33
  "@storybook/components": "^7.0.6",
@@ -37,8 +36,8 @@
37
36
  "@types/d3": "^7.4.3",
38
37
  "react": "~18.2.0",
39
38
  "react-dom": "~18.2.0",
40
- "@dxos/storybook-utils": "0.6.10-main.3cfcc89",
41
- "@dxos/react-ui": "0.6.10-main.3cfcc89"
39
+ "@dxos/react-ui": "0.6.10-main.bbdfaa4",
40
+ "@dxos/storybook-utils": "0.6.10-main.bbdfaa4"
42
41
  },
43
42
  "peerDependencies": {
44
43
  "@phosphor-icons/react": "^2.1.5",
Binary file
@@ -1,9 +0,0 @@
1
- import '@dxos-theme';
2
- import React from 'react';
3
- declare const _default: {
4
- title: string;
5
- decorators: import("@storybook/react/*").Decorator[];
6
- };
7
- export default _default;
8
- export declare const Default: () => React.JSX.Element | null;
9
- //# sourceMappingURL=rive.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rive.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/rive.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAoB,MAAM,OAAO,CAAC;;;;;AAMzC,wBAGE;AA+BF,eAAO,MAAM,OAAO,gCAoCnB,CAAC"}
@@ -1,84 +0,0 @@
1
- //
2
- // Copyright 2024 DXOS.org
3
- //
4
-
5
- import '@dxos-theme';
6
-
7
- import { type Rive, useRive } from '@rive-app/react-canvas';
8
- import React, { useEffect } from 'react';
9
-
10
- import { useAsyncCallback } from '@dxos/react-ui';
11
- import { mx } from '@dxos/react-ui-theme';
12
- import { withFullscreen, withTheme } from '@dxos/storybook-utils';
13
-
14
- export default {
15
- title: 'brand/Rive',
16
- decorators: [withTheme, withFullscreen({ classNames: ['absolute inset-0 bg-black'] })],
17
- };
18
-
19
- const useFlash = (rive: Rive | null, name: string, delay: number, period: number) => {
20
- useEffect(() => {
21
- let t: any;
22
- if (rive) {
23
- t = setTimeout(() => {
24
- t = setInterval(() => {
25
- rive?.play(name);
26
- }, period);
27
- }, delay);
28
- }
29
-
30
- return () => clearTimeout(t);
31
- }, [rive]);
32
- };
33
-
34
- const Component = ({ buffer }: { buffer: ArrayBuffer }) => {
35
- // https://rive.app/community/doc/rive-parameters/docHI9ASztXP
36
- const { rive, RiveComponent } = useRive({ buffer, autoplay: false });
37
- useFlash(rive, 'flash-1', 500, 3_000);
38
- useFlash(rive, 'flash-2', 2_000, 2_000);
39
-
40
- return (
41
- <div className='m-8 relative flex grow justify-center'>
42
- <RiveComponent />
43
- <div className='z-1 absolute inset-0' style={{ background: 'radial-gradient(transparent, black)' }} />
44
- </div>
45
- );
46
- };
47
-
48
- export const Default = () => {
49
- const buffer = useAsyncCallback<ArrayBuffer | undefined>(async () => {
50
- // CORS set via dashboard.
51
- const response = await fetch('https://dxos.network/dxos.riv', { mode: 'cors' });
52
- if (response.ok) {
53
- return await response.arrayBuffer();
54
- } else {
55
- console.log(response.status);
56
- }
57
- });
58
-
59
- if (!buffer) {
60
- return null;
61
- }
62
-
63
- return (
64
- <>
65
- <Component buffer={buffer} />
66
- <div className='flex absolute left-0 right-0 top-[120px] h-[320px] align-center'>
67
- <div
68
- className='z-1 absolute inset-0 w-[800px] m-auto'
69
- style={{
70
- background: 'radial-gradient(ellipse 200% 100% at center, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0) 50%)',
71
- }}
72
- />
73
- <div
74
- className={mx(
75
- 'z-2 absolute inset-0 flex items-center w-[720px] m-auto p-2',
76
- 'text-white text-[60px] leading-tight text-center font-thin _border _border-red-500',
77
- )}
78
- >
79
- The new standard for building collaborative local-first software.
80
- </div>
81
- </div>
82
- </>
83
- );
84
- };