Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 5 additions & 18 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
module.exports = {
stories: [
"../src/**/*.stories.@(js|jsx|ts|tsx|mdx)"
],
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials"
],
webpackFinal: async (config) => {
config.externals = {
'fs': 'null',
'node-uuid': 'null',
'node-fetch': 'fetch',
'isomorphic-fetch': 'fetch',
'xmldom': 'window',
'text-encoding': 'TextEncoder',
'whatwg-url': 'window',
'@trust/webcrypto': 'crypto'
}
// Return the altered config
return config;
},
};
core: {
builder: "webpack5"
}
}
49,232 changes: 27,984 additions & 21,248 deletions package-lock.json

Large diffs are not rendered by default.

76 changes: 37 additions & 39 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"lint-fix": "eslint \"src/**/*.js\" \"src/**/*.ts\" --fix",
"jest": "jest",
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --watch",
"test": "npm run build && npm run lint && npm run jest",
"test": "npm run build-version && npm run lint && npm run jest",
"doc": "typedoc --out ./Documentation/api/ ./src/ --excludeInternal",
"prepublishOnly": "npm test && npm run build",
"postpublish": "git push origin main --follow-tags",
Expand Down Expand Up @@ -53,65 +53,63 @@
},
"homepage": "https://github.com/solid/solid-ui",
"dependencies": {
"@babel/runtime": "^7.16.5",
"@storybook/addon-docs": "^6.4.18",
"crypto-browserify": "^3.12.0",
"escape-html": "^1.0.3",
"jss": "^10.9.0",
"jss-preset-default": "^10.9.0",
"mime-types": "^2.1.34",
"mime-types": "^2.1.35",
"pane-registry": "^2.4.7",
"path-browserify": "^1.0.1",
"rdflib": "^2.2.17",
"rdflib": "^2.2.18",
"solid-logic": "^1.3.14",
"solid-namespace": "^0.5.2",
"stream-browserify": "^3.0.0",
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/cli": "^7.16.0",
"@babel/core": "^7.16.5",
"@babel/plugin-proposal-class-properties": "^7.16.5",
"@babel/plugin-proposal-optional-chaining": "^7.16.5",
"@babel/plugin-transform-async-to-generator": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-typescript": "^7.16.5",
"@storybook/addon-actions": "^6.4.9",
"@storybook/addon-essentials": "^6.4.9",
"@storybook/addon-links": "^6.4.9",
"@storybook/html": "^6.4.9",
"@testing-library/dom": "^8.11.1",
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.7",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-optional-chaining": "^7.16.7",
"@babel/plugin-transform-async-to-generator": "^7.16.8",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@babel/runtime": "^7.17.7",
"@storybook/addon-docs": "^6.4.19",
"@storybook/addon-essentials": "^6.4.19",
"@storybook/addon-links": "^6.4.19",
"@storybook/builder-webpack5": "^6.4.19",
"@storybook/html": "^6.4.19",
"@storybook/manager-webpack5": "^6.4.19",
"@testing-library/dom": "^8.11.3",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^27.0.3",
"@types/jest": "^27.4.1",
"@types/jsdom": "^16.2.14",
"@types/node": "^17.0.5",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"@types/node": "^17.0.21",
"@types/react": "^17.0.40",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"babel-loader": "^8.2.3",
"eslint": "^7.32.0",
"eslint-config-standard": "^16.0.3",
"eslint": "^8.11.0",
"eslint-config-standard": "^17.0.0-1",
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-n": "^15.0.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"html-webpack-plugin": "^4.5.2",
"html-webpack-plugin": "^5.5.0",
"husky": "^7.0.4",
"jest": "^27.4.5",
"jest": "^27.5.1",
"jsdom": "^19.0.0",
"lint-staged": "^12.1.4",
"nock": "^13.2.1",
"raw-loader": "^4.0.2",
"lint-staged": "^12.3.7",
"nock": "^13.2.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-is": "^17.0.2",
"standard": "^16.0.4",
"ts-jest": "^27.1.2",
"typedoc": "^0.22.10",
"typescript": "^4.5.4",
"webpack": "^4.46.0",
"webpack-cli": "^3.3.12"
"ts-jest": "^27.1.3",
"typedoc": "^0.22.13",
"typescript": "^4.6.2",
"webpack": "^5.70.0",
"webpack-cli": "^4.9.2"
},
"husky": {
"hooks": {
Expand Down
14 changes: 7 additions & 7 deletions src/acl/access-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ function findAgent (uri, kb): PartialAgentTriple | null {
// An Origin URI is one like https://fred.github.io eith no trailing slash
if (uri.startsWith('http') && uri.split('/').length === 3) {
// there is no third slash
return { pred: 'origin', obj: obj } // The only way to know an origin alas
return { pred: 'origin', obj } // The only way to know an origin alas
}
// @@ This is an almighty kludge needed because drag and drop adds extra slashes to origins
if (
Expand All @@ -263,18 +263,18 @@ function findAgent (uri, kb): PartialAgentTriple | null {
return { pred: 'origin', obj: sym(uri.slice(0, -1)) } // Fix a URI where the drag and drop system has added a spurious slash
}

if (ns.vcard('WebID').uri in types) return { pred: 'agent', obj: obj }
if (ns.vcard('WebID').uri in types) return { pred: 'agent', obj }

if (ns.vcard('Group').uri in types) {
return { pred: 'agentGroup', obj: obj } // @@ note vcard membership not RDFs
return { pred: 'agentGroup', obj } // @@ note vcard membership not RDFs
}
if (
obj.sameTerm(ns.foaf('Agent')) ||
obj.sameTerm(ns.acl('AuthenticatedAgent')) || // AuthenticatedAgent
obj.sameTerm(ns.rdf('Resource')) ||
obj.sameTerm(ns.owl('Thing'))
) {
return { pred: 'agentClass', obj: obj }
return { pred: 'agentClass', obj }
}
if (
ns.vcard('Individual').uri in types ||
Expand All @@ -283,13 +283,13 @@ function findAgent (uri, kb): PartialAgentTriple | null {
) {
const pref = kb.any(obj, ns.foaf('preferredURI'))
if (pref) return { pred: 'agent', obj: sym(pref) }
return { pred: 'agent', obj: obj }
return { pred: 'agent', obj }
}
if (ns.solid('AppProvider').uri in types) {
return { pred: 'origin', obj: obj }
return { pred: 'origin', obj }
}
if (ns.solid('AppProviderClass').uri in types) {
return { pred: 'originClass', obj: obj }
return { pred: 'originClass', obj }
}
debug.log(' Triage fails for ' + uri)
return null
Expand Down
2 changes: 1 addition & 1 deletion src/chat/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export function renderMessageEditor (channelObject, messageTable, userContext, o
// messageEditor.appendChild(dom.createElement('br'))

let field, sendButton
const context = { div: middle, dom: dom }
const context = { div: middle, dom }

ensureLoggedIn(context).then(context => {
// me = context.me
Expand Down
2 changes: 1 addition & 1 deletion src/chat/thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function thread (dom, kb, subject, messageStore, options) {
rhs.appendChild(sendButton)
}

const context = { div: middle, dom: dom }
const context = { div: middle, dom }
login.ensureLoggedIn(context).then(context => {
me = context.me
turnOnInput()
Expand Down
2 changes: 1 addition & 1 deletion src/create/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function newThingUI (
ensureLoadedProfile(createContext).then(
_context => {
const newPaneOptions: NewPaneOptions = Object.assign({
newBase: newBase,
newBase,
folder: options.folder || undefined,
workspace: ws
}, options)
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import * as tabs from './tabs'
import * as utils from './utils'
import * as login from './login/login'
import * as widgets from './widgets/index'
import versionInfo from './versionInfo'
import { versionInfo } from './versionInfo'
import { initHeader } from './header'
import { initFooter } from './footer'
import * as createTypes from './create/types'
Expand Down
2 changes: 1 addition & 1 deletion src/login/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ export function selectWorkspace (

const me = offlineTestID()
const box = dom.createElement('div')
const context: AuthenticationContext = { me: me, dom: dom, div: box }
const context: AuthenticationContext = { me, dom, div: box }

function say (s, background) {
box.appendChild(widgets.errorMessageBlock(dom, s, background))
Expand Down
2 changes: 1 addition & 1 deletion src/media/media-capture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export function cameraCaptureControl (
;(store as any).fetcher
.webOperation('PUT', destination.uri, {
data: blob,
contentType: contentType
contentType
})
.then(
_resp => {
Expand Down
2 changes: 1 addition & 1 deletion src/messageArea.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export function messageArea (dom, kb, subject, messageStore, options) {
rhs.appendChild(sendButton)
}

const context = { div: middle, dom: dom }
const context = { div: middle, dom }
login.ensureLoggedIn(context).then(context => {
me = context.me
turnOnInput()
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Buttons.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import { action } from '@storybook/addon-actions'

<Meta title="Buttons" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/DateTime.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Date & Time"/>

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Display.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Display"/>

Expand Down
2 changes: 1 addition & 1 deletion src/stories/DomManipulation.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="DOM manipulation" />

Expand Down
2 changes: 1 addition & 1 deletion src/stories/DragAndDrop.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story, Props } from '@storybook/addon-docs/blocks';
import { Canvas, Meta, Story, Props } from '@storybook/addon-docs';
import { action } from '@storybook/addon-actions'

<Meta title="Drag & Drop"/>
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Events.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks';
import { Canvas, Meta, Story } from '@storybook/addon-docs';
import { action } from '@storybook/addon-actions'

<Meta title="Events" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Header.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Header"/>

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Images.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'
import { rawJsonDecorator } from './decorators'

export const imageDecorator = (Story) => {
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Interactive.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

import { action } from '@storybook/addon-actions'

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Log.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Log"/>

Expand Down
2 changes: 1 addition & 1 deletion src/stories/Matrix.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Matrix"/>

Expand Down
2 changes: 1 addition & 1 deletion src/stories/MediaTypes.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'
import { rawJsonDecorator } from './decorators'

<Meta title="Media Types" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Notepad.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'
import { rawJsonDecorator } from './decorators'

<Meta title="Notepad" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/RdfUtils.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'
import { rawJsonDecorator } from './decorators'

<Meta title="RDF utilities" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Tabs.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story, Props } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story, Props } from '@storybook/addon-docs'
import { action } from '@storybook/addon-actions'

<Meta title="Tabs"/>
Expand Down
2 changes: 1 addition & 1 deletion src/stories/Widgets.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Widgets" />

Expand Down
2 changes: 1 addition & 1 deletion src/stories/forms/Fields.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'
import { action } from '@storybook/addon-actions'

<Meta title="Forms/fields" />
Expand Down
2 changes: 1 addition & 1 deletion src/stories/forms/Forms.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as UI from '../../../lib'

import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
import { Canvas, Meta, Story } from '@storybook/addon-docs'

<Meta title="Forms/appendForm" />

Expand Down
Loading