Skip to content

Commit 3e14db5

Browse files
alyssachvastacopybara-github
authored andcommitted
Internal change
GitOrigin-RevId: 21cf985dbfdef06925eb5f157b5b8e1503ac280d
1 parent 885ec2a commit 3e14db5

File tree

247 files changed

+151445
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+151445
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
/.eslintcache
33
/.idea/
44
__pycache__
5+
6+
# Ignore Mac DS_Store files
7+
.DS_Store

visualization-library/.gitignore

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# Docusaurus cache and generated files
108+
.docusaurus
109+
110+
# Serverless directories
111+
.serverless/
112+
113+
# FuseBox cache
114+
.fusebox/
115+
116+
# DynamoDB Local files
117+
.dynamodb/
118+
119+
# TernJS port file
120+
.tern-port
121+
122+
# Stores VSCode versions used for testing VSCode extensions
123+
.vscode-test
124+
125+
# yarn v2
126+
.yarn/cache
127+
.yarn/unplugged
128+
.yarn/build-state.yml
129+
.yarn/install-state.gz
130+
.pnp.*
131+
132+
*storybook.log
133+
.DS_Store
134+
135+
# Storybook build output
136+
# storybook-static/
137+
138+
# Build artifacts
139+
dist/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/** @type { import('@storybook/web-components-vite').StorybookConfig } */
2+
const config = {
3+
"stories": [
4+
"../stories/**/*.mdx",
5+
"../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)"
6+
],
7+
"addons": [
8+
"@storybook/addon-essentials"
9+
],
10+
"framework": {
11+
"name": "@storybook/web-components-vite",
12+
"options": {}
13+
},
14+
"staticDirs": ['../stories/data', '../stories/assets'],
15+
"viteFinal": async (config) => {
16+
// Set base URL for GitHub Pages
17+
config.base = process.env.NODE_ENV === 'production' ? '/sensemaking-viz/' : '/';
18+
return config;
19+
}
20+
};
21+
export default config;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// .storybook/manager.js
2+
import { addons } from '@storybook/manager-api';
3+
import customTheme from './theme';
4+
5+
addons.setConfig({
6+
theme: customTheme,
7+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import theme from './theme';
2+
3+
/** @type { import('@storybook/web-components').Preview } */
4+
const preview = {
5+
parameters: {
6+
controls: {
7+
matchers: {
8+
color: /(background|color)$/i,
9+
date: /Date$/i,
10+
},
11+
},
12+
docs: {
13+
theme,
14+
},
15+
},
16+
};
17+
18+
export default preview;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { create } from '@storybook/theming';
2+
3+
4+
export default create({
5+
base: 'light',
6+
brandTitle: 'My custom Storybook',
7+
brandUrl: 'https://example.com',
8+
brandImage: 'logo.svg',
9+
brandTarget: '_self',
10+
});

visualization-library/README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Sensemaker Visualization Components
2+
3+
A collection of reusable visualization components for displaying Sensemaker data, built with D3.js and Web Components.
4+
5+
### Installation
6+
```bash
7+
npm install
8+
```
9+
10+
### Development
11+
To run the Storybook development environment:
12+
```bash
13+
npm run storybook
14+
```
15+
This will start the Storybook server at `http://localhost:6006`. You can view and interact with all components in isolation.
16+
17+
> **Note:** The Storybook stories use sample data from the `stories/data` directory. To view all stories correctly, ensure you have both a `comments.json` and a `summary.json` file present in `stories/data/`.
18+
19+
### Building the Package
20+
To build the package for production:
21+
```bash
22+
npm run build
23+
```
24+
The compiled files will be output to the `dist/` directory.
25+
26+
### Building Storybook Docs
27+
To build the static Storybook documentation site:
28+
```bash
29+
npm run build-storybook
30+
```
31+
The static site will be output to the `storybook-static/` directory. You can deploy this directory to any static site host.
32+
33+
### Publishing to npm
34+
35+
To publish a new version of the package to npm, follow these steps:
36+
37+
1. Make sure you are logged in to npm:
38+
```bash
39+
npm login
40+
```
41+
2. Update the version number using one of the following commands (this will automatically update `package.json` and create a Git commit and tag):
42+
- For a **patch** update (bug fixes, backwards compatible):
43+
```bash
44+
npm version patch
45+
```
46+
- For a **minor** update (new features, backwards compatible):
47+
```bash
48+
npm version minor
49+
```
50+
- For a **major** update (breaking changes):
51+
```bash
52+
npm version major
53+
```
54+
3. Build the package:
55+
```bash
56+
npm run build
57+
```
58+
4. Publish to npm:
59+
```bash
60+
npm publish
61+
```
62+
63+
> **Note:** The `npm version` command will automatically update the version in `package.json`. Always ensure your changes are committed before publishing.
64+
65+
## Data Source and License
66+
67+
The data used in this demo was gathered using the [Polis software](https://compdemocracy.org/Polis/) and is sub-licensed under CC BY 4.0 with Attribution to The Computational Democracy Project. The data and more information about how the data was collected can be found at the following link:
68+
69+
[https://github.com/compdemocracy/openData/tree/master/american-assembly.bowling-green](https://github.com/compdemocracy/openData/tree/master/american-assembly.bowling-green)

0 commit comments

Comments
 (0)