Skip to content

Commit

Permalink
Added notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
guillemcordoba committed Jul 5, 2024
1 parent c0e7e61 commit 7db4f5d
Show file tree
Hide file tree
Showing 17 changed files with 3,446 additions and 813 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Install and test
run: |
nix develop --command bash -c "pnpm i && pnpm t && pnpm -F @holochain-open-dev/tasks build"
nix develop --command bash -c "pnpm i && pnpm t && pnpm -F @darksoil-studio/tasks build"
- name: Build zomes
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:

- name: Install and test
run: |
nix develop --command bash -c "pnpm i && pnpm t && pnpm -F @holochain-open-dev/tasks build"
nix develop --command bash -c "pnpm i && pnpm t && pnpm -F @darksoil-studio/tasks build"
161 changes: 80 additions & 81 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,87 +1,86 @@
import { withMermaid } from 'vitepress-plugin-mermaid';
import fs from 'fs';
import { withMermaid } from 'vitepress-plugin-mermaid';

// https://vitepress.dev/reference/site-config
// Uncomment this to enable mermaid inside your site when this is solved: https://github.com/mermaid-js/mermaid/issues/4320
// export default withMermaid({
export default ({
vue: {
template: {
compilerOptions: {
// treat all tags with a dash as custom elements
isCustomElement: (tag) => tag.includes("-"),
},
},
},
vite: {
optimizeDeps: {
include: [
'mermaid'
]
}
},
base: "/tasks",
title: "@holochain-open-dev/tasks",
description: "Tasks zome for holochain apps",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
export default {
vue: {
template: {
compilerOptions: {
// treat all tags with a dash as custom elements
isCustomElement: tag => tag.includes('-'),
},
},
},
vite: {
optimizeDeps: {
include: ['mermaid'],
},
},
base: '/tasks',
title: '@darksoil-studio/tasks',
description: 'Tasks zome for holochain apps',
themeConfig: {
// https://vitepress.dev/reference/default-theme-config

sidebar: [
{
text: "Setup",
link: "/setup.md",
},
{
text: "API Reference",
items: [
{
text: "Integrity Zome",
link: "/backend/doc/tasks_integrity/index.html",
target: "_blank",
},
{
text: "Coordinator Zome",
link: "/backend/doc/tasks/index.html",
target: "_blank",
},
{
text: "Frontend",
items: [
{
text: "TasksStore",
link: "/tasks-store.md",
},
{
text: "Elements",
items: fs.readdirSync("./elements").filter(file => file.endsWith('.md')).map(el =>
({
text: el.split('.md')[0],
link: `/elements/${el}`,
}),
),
},
],
},
],
},
],
sidebar: [
{
text: 'Setup',
link: '/setup.md',
},
{
text: 'API Reference',
items: [
{
text: 'Integrity Zome',
link: '/backend/doc/tasks_integrity/index.html',
target: '_blank',
},
{
text: 'Coordinator Zome',
link: '/backend/doc/tasks/index.html',
target: '_blank',
},
{
text: 'Frontend',
items: [
{
text: 'TasksStore',
link: '/tasks-store.md',
},
{
text: 'Elements',
items: fs
.readdirSync('./elements')
.filter(file => file.endsWith('.md'))
.map(el => ({
text: el.split('.md')[0],
link: `/elements/${el}`,
})),
},
],
},
],
},
],

socialLinks: [
{
icon: "github",
link: "https://github.com/holochain-open-dev/tasks",
},
],
search: {
provider: 'local'
}
},
head: [
[
'script',
{},
// Synchronize the vitepress dark/light theme with the shoelace mode
`
socialLinks: [
{
icon: 'github',
link: 'https://github.com/darksoil-studio/tasks',
},
],
search: {
provider: 'local',
},
},
head: [
[
'script',
{},
// Synchronize the vitepress dark/light theme with the shoelace mode
`
function syncTheme() {
const isDark = document.documentElement.classList.contains('dark');
const isShoelaceDark = document.documentElement.classList.contains('sl-theme-dark');
Expand All @@ -96,7 +95,7 @@ export default ({
});
attrObserver.observe(document.documentElement, {attributes: true});
syncTheme();
`
]
],
});
`,
],
],
};
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
layout: home

hero:
name: "@holochain-open-dev/tasks"
name: "@darksoil-studio/tasks"
text: "Tasks zome for holochain apps"
tagline: Plug-and-play tasks management for your hApps
actions:
Expand Down
2 changes: 1 addition & 1 deletion docs/introduction.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @holochain-open-dev/tasks
# @darksoil-studio/tasks

This module follows the [holochain-open-dev](https://github.com/holochain-open-dev/) pattern of developing holochain modules. Read [its documentation](https://holochain-open-dev.github.io) to understand more about its motivation and the big picture.

Expand Down
50 changes: 25 additions & 25 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "docs",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"start": "pnpm dev",
"dev": "pnpm setup:docs && vitepress dev",
"build": "pnpm setup:docs && vitepress build",
"setup:docs": "pnpm -F @holochain-open-dev/tasks analyze && cp ../ui/custom-elements.json elements && pnpm setup:cargo",
"setup:cargo": "cargo doc --release --no-deps --target-dir public/backend",
"preview": "vitepress preview"
},
"devDependencies": {
"@api-viewer/demo": "1.0.0-pre.10",
"@api-viewer/docs": "1.0.0-pre.10",
"@holochain/client": "^0.17.0",
"@holochain-open-dev/profiles": "github:holochain-open-dev/profiles#nixify&path:ui",
"@holochain-open-dev/tasks": "workspace:*",
"@shoelace-style/shoelace": "^2.11.0",
"api-viewer-element": "^1.0.0-pre.10",
"lit": "^3.0.0",
"vitepress": "^1.0.1",
"vitepress-plugin-mermaid": "^2.0.16"
}
}
"name": "docs",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"start": "pnpm dev",
"dev": "pnpm setup:docs && vitepress dev",
"build": "pnpm setup:docs && vitepress build",
"setup:docs": "pnpm -F @darksoil-studio/tasks analyze && cp ../ui/custom-elements.json elements && pnpm setup:cargo",
"setup:cargo": "cargo doc --release --no-deps --target-dir public/backend",
"preview": "vitepress preview"
},
"devDependencies": {
"@api-viewer/demo": "1.0.0-pre.10",
"@api-viewer/docs": "1.0.0-pre.10",
"@holochain/client": "^0.17.0",
"@holochain-open-dev/profiles": "github:holochain-open-dev/profiles#nixify&path:ui",
"@darksoil-studio/tasks": "workspace:*",
"@shoelace-style/shoelace": "^2.11.0",
"api-viewer-element": "^1.0.0-pre.10",
"lit": "^3.0.0",
"vitepress": "^1.0.1",
"vitepress-plugin-mermaid": "^2.0.16"
}
}
12 changes: 6 additions & 6 deletions docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
1. Run this to scaffold this zome in your hApp:

```bash
nix run github:holochain-open-dev/tasks#scaffold
nix run github:darksoil-studio/tasks#scaffold
```

This will do the following:
Expand All @@ -31,18 +31,18 @@ async function setupTasksStore() {
}
```

3. Import the `<tasks-context>` element and add it to your html **wrapping the whole section of your page in which you are going to be placing** the other elements from `@holochain-open-dev/tasks`:
3. Import the `<tasks-context>` element and add it to your html **wrapping the whole section of your page in which you are going to be placing** the other elements from `@darksoil-studio/tasks`:

```js
// This can be placed in the index.js, at the top level of your web-app.
import "@holochain-open-dev/tasks/elements/tasks-context.js";
import "@darksoil-studio/tasks/elements/tasks-context.js";
```

And then add the `<tasks-context>` element in your html:

```html
<tasks-context>
<!-- Add here other elements from @holochain-open-dev/tasks -->
<!-- Add here other elements from @darksoil-studio/tasks -->
</tasks-context>
```

Expand Down Expand Up @@ -90,7 +90,7 @@ contextElement.store = store;
5. [Choose which elements you need](?path=/docs/frontend-elements) and import them like this:

```js
import "@holochain-open-dev/tasks/dist/elements/tasks-context.js";
import "@darksoil-studio/tasks/dist/elements/tasks-context.js";
```

And then they are ready be used inside the `<tasks-context>` just like any other HTML tag.
Expand All @@ -113,5 +113,5 @@ That's it! You have now integrated both the backend and the frontend for the pro

# Example

You can see a full working example of the UI working in [here](https://github.com/holochain-open-dev/tasks/blob/main/ui/demo/index.html).
You can see a full working example of the UI working in [here](https://github.com/darksoil-studio/tasks/blob/main/ui/demo/index.html).

2 changes: 1 addition & 1 deletion docs/tasks-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The `TasksStore` is a typescript class that contains [async signals](https://www.npmjs.com/package/async-signals), which you can watch to get reactive updates in your elements.

```js
import { TasksStore, TasksClient } from "@holochain-open-dev/tasks";
import { TasksStore, TasksClient } from "@darksoil-studio/tasks";
const store = new TasksStore(new TasksClient(appClient, 'my-role-name'));
```

Expand Down
Loading

0 comments on commit 7db4f5d

Please sign in to comment.