upgrade-pks
This commit is contained in:
parent
6595b64af0
commit
e9e141b36f
|
@ -3,5 +3,6 @@ public
|
||||||
*.cjs
|
*.cjs
|
||||||
src/graphql/*.gen.ts
|
src/graphql/*.gen.ts
|
||||||
src/legacy_*
|
src/legacy_*
|
||||||
|
src/components/EditorExample
|
||||||
dist/
|
dist/
|
||||||
.vercel/
|
.vercel/
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
[+] hybrid routing ssr/spa
|
[+] hybrid routing ssr/spa
|
||||||
[+] 'expo' pages
|
[+] 'expo' pages
|
||||||
[-] layout term usage with an exception
|
[-] layout term usage with an exception
|
||||||
[-] nanostores
|
[-] less nanostores
|
||||||
[+] inbox
|
[+] inbox
|
||||||
[+] css modules
|
[+] css modules
|
||||||
[+] draft editor
|
[+] draft editor
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { defineConfig, AstroUserConfig } from 'astro/config'
|
||||||
import vercel from '@astrojs/vercel/serverless'
|
import vercel from '@astrojs/vercel/serverless'
|
||||||
import solidJs from '@astrojs/solid-js'
|
import solidJs from '@astrojs/solid-js'
|
||||||
import type { CSSOptions } from 'vite'
|
import type { CSSOptions } from 'vite'
|
||||||
import defaultGenerateScopedName from 'postcss-modules/build/generateScopedName'
|
import { generateScopedNameDefault } from 'postcss-modules/build/scoping'
|
||||||
import { isDev } from './src/utils/config'
|
import { isDev } from './src/utils/config'
|
||||||
import { visualizer } from 'rollup-plugin-visualizer'
|
import { visualizer } from 'rollup-plugin-visualizer'
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ const getDevCssClassPrefix = (filename: string): string => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
const devGenerateScopedName = (name: string, filename: string, css: string) =>
|
||||||
getDevCssClassPrefix(filename) + '_' + defaultGenerateScopedName(name, filename, css)
|
getDevCssClassPrefix(filename) + '_' + generateScopedNameDefault(name, filename, css)
|
||||||
|
|
||||||
const css: CSSOptions = {
|
const css: CSSOptions = {
|
||||||
preprocessorOptions: {
|
preprocessorOptions: {
|
||||||
|
@ -25,7 +25,7 @@ const css: CSSOptions = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modules: {
|
modules: {
|
||||||
generateScopedName: isDev ? devGenerateScopedName : defaultGenerateScopedName,
|
generateScopedName: isDev ? devGenerateScopedName : generateScopedNameDefault,
|
||||||
localsConvention: null
|
localsConvention: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
96
package.json
96
package.json
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "discoursio-webapp",
|
"name": "discoursio-webapp",
|
||||||
"version": "0.5.1",
|
"version": "0.6.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -30,61 +30,61 @@
|
||||||
"vercel-build": "astro build"
|
"vercel-build": "astro build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"mailgun.js": "^8.0.1"
|
"mailgun.js": "^8.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/solid-js": "^1.1.0",
|
"@astrojs/solid-js": "^1.2.2",
|
||||||
"@astrojs/vercel": "^2.1.0",
|
"@astrojs/vercel": "^2.3.3",
|
||||||
"@babel/core": "^7.18.13",
|
"@babel/core": "^7.20.2",
|
||||||
"@graphql-codegen/cli": "^2.12.1",
|
"@graphql-codegen/cli": "^2.13.11",
|
||||||
"@graphql-codegen/typescript": "^2.7.3",
|
"@graphql-codegen/typescript": "^2.8.1",
|
||||||
"@graphql-codegen/typescript-operations": "^2.5.3",
|
"@graphql-codegen/typescript-operations": "^2.5.6",
|
||||||
"@graphql-codegen/typescript-urql": "^3.7.0",
|
"@graphql-codegen/typescript-urql": "^3.7.3",
|
||||||
"@graphql-codegen/urql-introspection": "^2.2.1",
|
"@graphql-codegen/urql-introspection": "^2.2.1",
|
||||||
"@graphql-tools/url-loader": "^7.16.4",
|
"@graphql-tools/url-loader": "^7.16.15",
|
||||||
"@graphql-typed-document-node/core": "^3.1.1",
|
"@graphql-typed-document-node/core": "^3.1.1",
|
||||||
"@nanostores/persistent": "^0.7.0",
|
|
||||||
"@nanostores/router": "^0.7.0",
|
"@nanostores/router": "^0.7.0",
|
||||||
"@nanostores/solid": "^0.3.0",
|
"@nanostores/solid": "^0.3.0",
|
||||||
"@popperjs/core": "^2.11.6",
|
"@popperjs/core": "^2.11.6",
|
||||||
"@solid-devtools/debugger": "^0.13.1",
|
"@solid-devtools/debugger": "^0.14.0",
|
||||||
"@solid-devtools/logger": "^0.4.9",
|
"@solid-devtools/logger": "^0.5.0",
|
||||||
"@solid-primitives/memo": "^1.0.2",
|
"@solid-primitives/memo": "^1.1.2",
|
||||||
|
"@solid-primitives/storage": "^1.3.3",
|
||||||
"@types/express": "^4.17.14",
|
"@types/express": "^4.17.14",
|
||||||
"@types/node": "^18.7.19",
|
"@types/node": "^18.11.9",
|
||||||
"@types/uuid": "^8.3.4",
|
"@types/uuid": "^8.3.4",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.29.0",
|
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||||
"@typescript-eslint/parser": "^5.35.1",
|
"@typescript-eslint/parser": "^5.42.1",
|
||||||
"@urql/core": "^3.0.1",
|
"@urql/core": "^3.0.5",
|
||||||
"@urql/devtools": "^2.0.3",
|
"@urql/devtools": "^2.0.3",
|
||||||
"@urql/exchange-auth": "^1.0.0",
|
"@urql/exchange-auth": "^1.0.0",
|
||||||
"@urql/exchange-graphcache": "^5.0.0",
|
"@urql/exchange-graphcache": "^5.0.5",
|
||||||
"astro": "^1.1.1",
|
"astro": "^1.6.7",
|
||||||
"astro-eslint-parser": "^0.9.0",
|
"astro-eslint-parser": "^0.9.0",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"bootstrap": "5.1.3",
|
"bootstrap": "5.1.3",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"cookie": "^0.5.0",
|
"cookie": "^0.5.0",
|
||||||
"cookie-signature": "^1.2.0",
|
"cookie-signature": "^1.2.0",
|
||||||
"eslint": "^8.26.0",
|
"eslint": "^8.27.0",
|
||||||
"eslint-config-stylelint": "^17.0.0",
|
"eslint-config-stylelint": "^17.0.0",
|
||||||
"eslint-import-resolver-typescript": "^3.5.0",
|
"eslint-import-resolver-typescript": "^3.5.2",
|
||||||
"eslint-plugin-astro": "^0.21.0",
|
"eslint-plugin-astro": "^0.21.0",
|
||||||
"eslint-plugin-import": "^2.26.0",
|
"eslint-plugin-import": "^2.26.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.6.1",
|
"eslint-plugin-jsx-a11y": "^6.6.1",
|
||||||
"eslint-plugin-promise": "^6.0.1",
|
"eslint-plugin-promise": "^6.1.1",
|
||||||
"eslint-plugin-solid": "^0.7.3",
|
"eslint-plugin-solid": "^0.8.0",
|
||||||
"eslint-plugin-sonarjs": "^0.16.0",
|
"eslint-plugin-sonarjs": "^0.16.0",
|
||||||
"eslint-plugin-unicorn": "^44.0.2",
|
"eslint-plugin-unicorn": "^44.0.2",
|
||||||
"graphql": "^16.6.0",
|
"graphql": "^16.6.0",
|
||||||
"graphql-tag": "^2.12.6",
|
"graphql-tag": "^2.12.6",
|
||||||
"graphql-ws": "^5.11.2",
|
"graphql-ws": "^5.11.2",
|
||||||
"hast-util-select": "^5.0.2",
|
"hast-util-select": "^5.0.2",
|
||||||
"husky": "^8.0.1",
|
"husky": "^8.0.2",
|
||||||
"idb": "^7.1.0",
|
"idb": "^7.1.1",
|
||||||
"jest": "^29.2.1",
|
"jest": "^29.3.1",
|
||||||
"lint-staged": "^13.0.3",
|
"lint-staged": "^13.0.3",
|
||||||
"loglevel": "^1.8.0",
|
"loglevel": "^1.8.1",
|
||||||
"loglevel-plugin-prefix": "^0.8.4",
|
"loglevel-plugin-prefix": "^0.8.4",
|
||||||
"markdown-it": "^13.0.1",
|
"markdown-it": "^13.0.1",
|
||||||
"markdown-it-container": "^3.0.0",
|
"markdown-it-container": "^3.0.0",
|
||||||
|
@ -93,50 +93,50 @@
|
||||||
"markdown-it-replace-link": "^1.1.0",
|
"markdown-it-replace-link": "^1.1.0",
|
||||||
"nanostores": "^0.7.0",
|
"nanostores": "^0.7.0",
|
||||||
"orderedmap": "^2.1.0",
|
"orderedmap": "^2.1.0",
|
||||||
"postcss": "^8.4.16",
|
"postcss": "^8.4.19",
|
||||||
"postcss-modules": "^5.0.0",
|
"postcss-modules": "^6.0.0",
|
||||||
"prettier": "^2.7.1",
|
"prettier": "^2.7.1",
|
||||||
"prettier-eslint": "^15.0.1",
|
"prettier-eslint": "^15.0.1",
|
||||||
"prosemirror-commands": "^1.3.1",
|
"prosemirror-commands": "^1.3.1",
|
||||||
"prosemirror-dropcursor": "^1.6.0",
|
"prosemirror-dropcursor": "^1.6.1",
|
||||||
"prosemirror-example-setup": "^1.2.1",
|
"prosemirror-example-setup": "^1.2.1",
|
||||||
"prosemirror-gapcursor": "^1.3.1",
|
"prosemirror-gapcursor": "^1.3.1",
|
||||||
"prosemirror-history": "^1.3.0",
|
"prosemirror-history": "^1.3.0",
|
||||||
"prosemirror-inputrules": "^1.2.0",
|
"prosemirror-inputrules": "^1.2.0",
|
||||||
"prosemirror-keymap": "^1.2.0",
|
"prosemirror-keymap": "^1.2.0",
|
||||||
"prosemirror-markdown": "^1.9.4",
|
"prosemirror-markdown": "^1.10.1",
|
||||||
"prosemirror-menu": "^1.2.1",
|
"prosemirror-menu": "^1.2.1",
|
||||||
"prosemirror-model": "^1.16.0",
|
"prosemirror-model": "^1.18.1",
|
||||||
"prosemirror-schema-list": "^1.2.2",
|
"prosemirror-schema-list": "^1.2.2",
|
||||||
"prosemirror-state": "^1.4.1",
|
"prosemirror-state": "^1.4.2",
|
||||||
"prosemirror-view": "^1.28.1",
|
"prosemirror-view": "^1.29.0",
|
||||||
"rollup": "~2.79.1",
|
"rollup": "~2.79.1",
|
||||||
"rollup-plugin-visualizer": "^5.8.2",
|
"rollup-plugin-visualizer": "^5.8.3",
|
||||||
"sass": "^1.55.0",
|
"sass": "^1.56.1",
|
||||||
"solid-devtools": "^0.20.1",
|
"solid-devtools": "^0.22.0",
|
||||||
"solid-js": "^1.6.0",
|
"solid-js": "^1.6.2",
|
||||||
"solid-js-form": "^0.1.5",
|
"solid-js-form": "^0.1.5",
|
||||||
"solid-jsx": "^0.9.1",
|
"solid-jsx": "^0.9.1",
|
||||||
"solid-social": "^0.9.0",
|
"solid-social": "^0.9.0",
|
||||||
"solid-utils": "^0.8.1",
|
"solid-utils": "^0.8.1",
|
||||||
"sort-package-json": "^2.0.0",
|
"sort-package-json": "^2.1.0",
|
||||||
"stylelint": "^14.12.1",
|
"stylelint": "^14.14.1",
|
||||||
"stylelint-config-css-modules": "^4.1.0",
|
"stylelint-config-css-modules": "^4.1.0",
|
||||||
"stylelint-config-prettier-scss": "^0.0.1",
|
"stylelint-config-prettier-scss": "^0.0.1",
|
||||||
"stylelint-config-standard-scss": "^6.0.0",
|
"stylelint-config-standard-scss": "^6.1.0",
|
||||||
"stylelint-order": "^5.0.0",
|
"stylelint-order": "^5.0.0",
|
||||||
"stylelint-scss": "^4.3.0",
|
"stylelint-scss": "^4.3.0",
|
||||||
"swiper": "^8.4.2",
|
"swiper": "^8.4.4",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.8.3",
|
"typescript": "^4.8.4",
|
||||||
"undici": "^5.10.0",
|
"undici": "^5.12.0",
|
||||||
"unique-names-generator": "^4.7.1",
|
"unique-names-generator": "^4.7.1",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"vite": "^3.1.3",
|
"vite": "^3.2.3",
|
||||||
"ws": "^8.9.0",
|
"ws": "^8.11.0",
|
||||||
"y-prosemirror": "^1.2.0",
|
"y-prosemirror": "^1.2.0",
|
||||||
"y-protocols": "^1.0.5",
|
"y-protocols": "^1.0.5",
|
||||||
"y-webrtc": "^10.2.3",
|
"y-webrtc": "^10.2.3",
|
||||||
"yjs": "^13.5.41"
|
"yjs": "^13.5.42"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
10948
pnpm-lock.yaml
Normal file
10948
pnpm-lock.yaml
Normal file
File diff suppressed because it is too large
Load Diff
|
@ -15,6 +15,7 @@
|
||||||
.authorDetails {
|
.authorDetails {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
//padding-right: 1.2rem;
|
//padding-right: 1.2rem;
|
||||||
width: max-content;
|
width: max-content;
|
||||||
|
|
||||||
|
@ -242,6 +243,7 @@
|
||||||
.authorsListItem {
|
.authorsListItem {
|
||||||
.authorName {
|
.authorName {
|
||||||
@include font-size(2.2rem);
|
@include font-size(2.2rem);
|
||||||
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ export const Donate = () => {
|
||||||
script.type = 'text/javascript'
|
script.type = 'text/javascript'
|
||||||
script.src = 'https://widget.cloudpayments.ru/bundles/cloudpayments.js'
|
script.src = 'https://widget.cloudpayments.ru/bundles/cloudpayments.js'
|
||||||
script.async = true
|
script.async = true
|
||||||
script.onload = initiated
|
script.addEventListener('load', initiated)
|
||||||
document.head.appendChild(script)
|
document.head.appendChild(script)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -34,11 +34,11 @@ export const LayoutView = (props: LayoutProps) => {
|
||||||
const { sortedArticles } = useArticlesStore({ sortedArticles: props.shouts })
|
const { sortedArticles } = useArticlesStore({ sortedArticles: props.shouts })
|
||||||
const layout = createMemo(() => props.layout)
|
const layout = createMemo(() => props.layout)
|
||||||
|
|
||||||
const loadMoreLayout = async (layout: string) => {
|
const loadMoreLayout = async (kind: string) => {
|
||||||
saveScrollPosition()
|
saveScrollPosition()
|
||||||
|
|
||||||
const { hasMore } = await loadLayoutShouts({
|
const { hasMore } = await loadLayoutShouts({
|
||||||
layout,
|
layout: kind,
|
||||||
amount: LOAD_MORE_PAGE_SIZE,
|
amount: LOAD_MORE_PAGE_SIZE,
|
||||||
offset: sortedArticles().length
|
offset: sortedArticles().length
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { persistentMap } from '@nanostores/persistent'
|
import { createStorageSignal } from '@solid-primitives/storage'
|
||||||
import type { Reaction } from '../graphql/types.gen'
|
import type { Reaction } from '../graphql/types.gen'
|
||||||
import { atom } from 'nanostores'
|
|
||||||
import { createSignal } from 'solid-js'
|
import { createSignal } from 'solid-js'
|
||||||
|
|
||||||
|
// TODO: store drafts
|
||||||
// import type { Draft } from '../components/EditorExample/store/context'
|
// import type { Draft } from '../components/EditorExample/store/context'
|
||||||
|
|
||||||
interface Collab {
|
interface Collab {
|
||||||
|
@ -13,18 +13,13 @@ interface Collab {
|
||||||
title?: string
|
title?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const drafts = persistentMap<{ [key: string]: string }>(
|
export const drafts = createStorageSignal<{ [key: string]: string }>('drafts', {}) // save drafts on device
|
||||||
'drafts',
|
export const [collabs, setCollabs] = createSignal<Collab[]>([]) // save collabs in backend or in p2p network
|
||||||
{},
|
|
||||||
{
|
|
||||||
encode: JSON.stringify,
|
|
||||||
decode: JSON.parse
|
|
||||||
}
|
|
||||||
) // save drafts on device
|
|
||||||
|
|
||||||
export const collabs = atom<Collab[]>([]) // save collabs in backend or in p2p network
|
|
||||||
export const [editorReactions, setReactions] = createSignal<Reaction[]>([])
|
export const [editorReactions, setReactions] = createSignal<Reaction[]>([])
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
TODO: approvals and proposals derived stores
|
||||||
|
|
||||||
const approvals = computed(
|
const approvals = computed(
|
||||||
reactions,
|
reactions,
|
||||||
(rdict) => Object.values(rdict)
|
(rdict) => Object.values(rdict)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { atom } from 'nanostores'
|
import { createSignal } from 'solid-js'
|
||||||
import type { Chat } from '../graphql/types.gen'
|
import type { Chat } from '../graphql/types.gen'
|
||||||
|
|
||||||
export const chats = atom<Chat[]>([])
|
export const [chats, setChats] = createSignal<Chat[]>([])
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
//import { persistentAtom } from '@nanostores/persistent'
|
|
||||||
import { createSignal } from 'solid-js'
|
import { createSignal } from 'solid-js'
|
||||||
import { useRouter } from './router'
|
import { useRouter } from './router'
|
||||||
|
|
||||||
//export const locale = persistentAtom<string>('locale', 'ru')
|
|
||||||
export const [locale, setLocale] = createSignal('ru')
|
export const [locale, setLocale] = createSignal('ru')
|
||||||
export type ModalType = 'auth' | 'subscribe' | 'feedback' | 'thank' | 'donate'
|
export type ModalType = 'auth' | 'subscribe' | 'feedback' | 'thank' | 'donate'
|
||||||
type WarnKind = 'error' | 'warn' | 'info'
|
type WarnKind = 'error' | 'warn' | 'info'
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
import { persistentAtom } from '@nanostores/persistent'
|
import { createStorageSignal } from '@solid-primitives/storage'
|
||||||
import { useStore } from '@nanostores/solid'
|
|
||||||
|
|
||||||
const seen = persistentAtom<{ [slug: string]: Date }>(
|
// local stored seen marks by shout's slug
|
||||||
'seen',
|
export const [seen, setSeen] = createStorageSignal<{ [slug: string]: Date }>('seen', {})
|
||||||
{},
|
export const addSeen = (slug) => setSeen({ ...seen(), [slug]: Date.now() })
|
||||||
{
|
|
||||||
encode: JSON.stringify,
|
|
||||||
decode: JSON.parse
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
export const addSeen = (slug) => seen.set({ ...seen.get(), [slug]: Date.now() })
|
|
||||||
|
|
||||||
export const useSeenStore = () => {
|
|
||||||
const getSeen = useStore(seen)
|
|
||||||
return { getSeen }
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user