diff --git a/orbitmines.com/src/@orbitmines/Visualization.tsx b/orbitmines.com/src/@orbitmines/Visualization.tsx index b889f87..514bcfd 100644 --- a/orbitmines.com/src/@orbitmines/Visualization.tsx +++ b/orbitmines.com/src/@orbitmines/Visualization.tsx @@ -6,9 +6,7 @@ import {useSearchParams} from "react-router-dom"; import {toPng} from "html-to-image"; import {Button} from "@blueprintjs/core"; import isWebGLAvailable = WEBGL.isWebGLAvailable; -import {PaperProps} from "../lib/paper/Paper"; -import {Children} from "../lib/typescript/React"; -import { Col, Row } from "../lib/render/Layout"; +import {Children, Col, PaperProps, Row} from "../lib/paper/Paper"; export const NoWebGL = () => { return
No WebGL
diff --git a/orbitmines.com/src/@orbitmines/js/react/Modules.tsx b/orbitmines.com/src/@orbitmines/js/react/Modules.tsx index e997c8c..ced3122 100644 --- a/orbitmines.com/src/@orbitmines/js/react/Modules.tsx +++ b/orbitmines.com/src/@orbitmines/js/react/Modules.tsx @@ -1,9 +1,9 @@ import React, {createContext} from "react"; import IModule from "./IModule"; -import {Children} from "../../../lib/typescript/React"; import useHoveringModule from "./hooks/useHovering"; import useHotkeysModule from "./hooks/useHotkeys"; import IEventListener, {mergeListeners} from "./IEventListener"; +import {Children} from "../../../lib/paper/Paper"; export const ModulesContext = createContext[]>([]); diff --git a/orbitmines.com/src/App.tsx b/orbitmines.com/src/App.tsx index 70349e4..a5393a2 100755 --- a/orbitmines.com/src/App.tsx +++ b/orbitmines.com/src/App.tsx @@ -1,14 +1,13 @@ import {HotkeysProvider} from '@blueprintjs/core'; import React from 'react'; import IEventListener from "./@orbitmines/js/react/IEventListener"; -import {Children} from "./lib/typescript/React"; import {Route, Routes} from 'react-router-dom'; import Root from "./routes/Root"; import Paper from "./routes/Paper"; -import Profile from "./routes/Profiles"; +import Profile from "./routes/profiles/Profiles"; import {Helmet} from "react-helmet"; import Modules from "./@orbitmines/js/react/Modules"; -import {ThumbnailPage} from "./lib/paper/Paper"; +import {Children, ThumbnailPage} from "./lib/paper/Paper"; import Archive from "./routes/Archive"; export const Router = () => { diff --git a/orbitmines.com/src/lib/organizations/ORGANIZATIONS.ts b/orbitmines.com/src/lib/organizations/ORGANIZATIONS.ts index 4c1a868..12e10fd 100755 --- a/orbitmines.com/src/lib/organizations/ORGANIZATIONS.ts +++ b/orbitmines.com/src/lib/organizations/ORGANIZATIONS.ts @@ -21,8 +21,7 @@ import all_in_icon from "././all-in/icon.jpeg"; import zx_calculus_icon from "././zx/icon.png"; import active_inference_institute_icon from "././active-inference-institute/channels4_profile.jpg"; import toe_icon from "././toe/toe.jpg"; -import {Renderable} from "../typescript/React"; -import {ReferenceProps} from "../paper/Paper"; +import {ReferenceProps, Renderable} from "../paper/Paper"; export type SVG = { viewBox: { diff --git a/orbitmines.com/src/lib/organizations/temp.ts b/orbitmines.com/src/lib/organizations/temp.ts deleted file mode 100644 index 3da0ed0..0000000 --- a/orbitmines.com/src/lib/organizations/temp.ts +++ /dev/null @@ -1,38 +0,0 @@ - -const string = - "" - -const res = string.split('\n') - .filter(l => l.startsWith('-')) - .map(l => l.trim()) - .map(l => { - const [title, year, link] = [...l.matchAll(/\[(.+)\s(.+)]\((.+)\)/g)] - .map(m => [m[1], m[2], m[3]])[0]; - const organizations = [...l.matchAll(/:([a-z_]+):/g)] - .map(m => m[1]); - // .map(key => (ORGANIZATIONS as any)[key]!); - const authors = [...l.matchAll(/\*(.+)\*$/g)] - .map(m => m[1]) - .join() - .replaceAll(/(\s(and|&)\s)/g, ",") - .split(",") - .map(name => name.trim()); - - const ref = title - .replaceAll(/[|&':{}()#",?*$%^=@;\[\]/\\.\"\']/g, "") - .replace(/\s{2,}/g, ' ') - .replaceAll(/[- ]/g, "_") - .toUpperCase(); - - // return `${ref}: { - // reference: { - // title: '${title}', - // authors: [${authors.map(author => `{name: '${author}'}`).join(',')}], - // organizations: [${organizations.map(org => `ORGANIZATIONS.${org}`)}], - // year: '${year}', - // link: "${link}" - // }, status: Viewed.VIEWED, viewed_at: "2023, December" - // }` - return `REFERENCES.${ref}`; - }).join(',\n') -console.log(res); \ No newline at end of file diff --git a/orbitmines.com/src/lib/paper/Paper.tsx b/orbitmines.com/src/lib/paper/Paper.tsx index d8ec385..7e9d4f9 100644 --- a/orbitmines.com/src/lib/paper/Paper.tsx +++ b/orbitmines.com/src/lib/paper/Paper.tsx @@ -1,19 +1,238 @@ -import React, {ReactNode, useCallback, useRef} from 'react'; +import React, {ReactNode, useCallback, useMemo, useRef} from 'react'; import {Helmet} from "react-helmet"; import ExportablePaper, {PdfProps} from "./views/ExportablePaper"; -import {AllowReact, Children, Predicate, Renderable, Rendered, value} from "../typescript/React"; import {useLocation, useNavigate, useSearchParams} from "react-router-dom"; import JetBrainsMono from "../layout/font/fonts/JetBrainsMono/JetBrainsMono"; -import ORGANIZATIONS, {ExternalProfile, TOrganization, TProfile} from "../organizations/ORGANIZATIONS"; +import ORGANIZATIONS, {Content, ExternalProfile, TOrganization, TProfile} from "../organizations/ORGANIZATIONS"; import _ from "lodash"; -import {Col, Grid, Row, RowProps} from "../render/Layout"; import {Button, Divider, H1, H3, H4, H6, Intent, Popover, Tag} from "@blueprintjs/core"; import CustomIcon from "../layout/icons/CustomIcon"; import {toJpeg} from "html-to-image"; import {CanvasContainer} from "../../@orbitmines/Visualization"; -import {PROFILES} from "../../profiles/profiles"; +import classNames from "classnames"; +import {PROFILES} from "../../routes/profiles/profiles"; +import {Highlight, Prism, themes} from "prism-react-renderer"; + +// export const getClass = (className: string) => (styles && styles[className]) ? styles[className] : className; + +export type ColumnSize = number | boolean; +export type ViewportSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; +export type Alignment = 'start' | 'center' | 'end' | 'top' | 'middle' | 'bottom' | 'around' | 'between'; + +// TODO: ts-transformer-keys +export const ViewportSizes: ViewportSize[] = ['xs', 'sm', 'md', 'lg', 'xl'] +export const Alignments: Alignment[] = ['start', 'center', 'end', 'top', 'middle', 'bottom', 'around', 'between']; + +export const Grid = (props: React.HTMLAttributes & { + fluid?: boolean + tagName?: string +}) => { + return React.createElement(props.tagName ?? 'div', { + ...props, + className: classNames( + props.fluid ? 'container-fluid' : 'container', + props.className, + ) + }); +} + +export type ColumnProps = { + [T in ViewportSize]?: ColumnSize +} & { + [T in `${ViewportSize}Offset`]?: number +} & { + first?: ViewportSize + last?: ViewportSize + tagName?: string +}; + +export const Col = (props: React.HTMLAttributes & ColumnProps) => { + const { + tagName = 'div', + + first, + last, + + className + } = props; + + return React.createElement(tagName, { + ...props, + className: classNames( + first ? `first-${first}` : null, + last ? `last-${first}` : null, + + ...ViewportSizes.map(size => { + let value = props[size]; + let offset = props[`${size}Offset`]; + + return ({ + [`col-${size}${_.isInteger(value) ? `-${value}` : ''}`]: !!value, + [`col-${size}-offset${_.isInteger(offset) ? `-${offset}` : ''}`]: !!offset, + }) + }), + + className + ) + }); +} + +export type RowProps = { + [T in Alignment]?: ViewportSize +} & { + reverse?: boolean, + tagName?: string +}; + +export const Row = (props: React.HTMLAttributes & RowProps) => { + const { + tagName = 'div', + reverse, + + className + } = props; + + return React.createElement(tagName, { + ...props, + className: classNames( + 'row', + { + reverse, + }, + ...Alignments.map(alignment => props[alignment] ? `${alignment}-${props[alignment]}` : null), + className + ) + }); +} + +export type Children = { children: ReactNode }; + +export type AllowReact = { + [TKey in keyof T]: T[TKey] extends string ? ReactNode : T[TKey]; +} + +export type Renderable = T | { value: T, render: (value: T) => ReactNode }; + +// TODO ; Some directionality which takes this as a value, just any function to some other. +export const Rendered = ({renderable}: { renderable: Renderable}) => { + const rendered = useMemo(() => renderable?.render ? renderable.render(renderable.value) : renderable, [renderable]); + + return <>{rendered}; +} + +export const value = (renderable: Renderable) => renderable?.render ? renderable.value : renderable; + +export function renderable(value: T, _default: (value: T) => ReactNode = (value) => value): Renderable { return { value: value, render: _default }} + +export type Predicate = (value: T, index: number, array: T[]) => unknown; + +export const highlight = (code: string) => ( + // @ts-ignore + + {({className, style, tokens, getLineProps, getTokenProps}) => ( + <> + {tokens.map((line, i) => ( +
+ {line.map((token, key) => )} +
+ ))} + + )} +
+) + +export type CodeBlockProps = { + code: string +} + +export const Block = ({children, className, style = {}, ...props}: Children & React.HTMLAttributes) => { + return ( +
+      {children}
+    
+ ) +} + +export const CodeBlock = (props: CodeBlockProps) => { + const {code} = props; + + return + {highlight(code)} + ; +}; + + +export const Category = (props: { + content?: Content[], + inline?: boolean, + simple?: boolean +}) => { + const {inline, simple = false, content} = props; + + if (!props.content) + return <>; + + const Item = ({item, index}: { item: Content, index: number }) => { + return + + ; + } + + const inline_item = () => + {content.map((item, index) => )} + + + if (inline) + return inline_item(); + + const simple_item = () =>
+ {/*

{name}

*/} + {content.map((item, index) => + + + + )} +
+ + if (simple) + simple_item(); + + return + {content.map((item, index) => + + )} + +} + +export const pageStyles = { + // width: '1240px'; + // height: '1754px'; + width: '100%', + maxWidth: '100vw', + minHeight: '100vh', + // fontSize: '1.1rem' +}; + +export const Layer = ({zIndex, children, ...props}: any) => { + return
+ {children} +
; +} -const Exports = ( +export const Exports = ( {paper, children}: { paper: PaperProps } & Children ) => { const location = useLocation(); diff --git a/orbitmines.com/src/lib/render/Layout.tsx b/orbitmines.com/src/lib/render/Layout.tsx deleted file mode 100644 index 4298d64..0000000 --- a/orbitmines.com/src/lib/render/Layout.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import React from "react"; -import classNames from "classnames"; -import _ from "lodash"; - -// export const getClass = (className: string) => (styles && styles[className]) ? styles[className] : className; - -export type ColumnSize = number | boolean; -export type ViewportSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; -export type Alignment = 'start' | 'center' | 'end' | 'top' | 'middle' | 'bottom' | 'around' | 'between'; - -// TODO: ts-transformer-keys -export const ViewportSizes: ViewportSize[] = ['xs', 'sm', 'md', 'lg', 'xl'] -export const Alignments: Alignment[] = ['start', 'center', 'end', 'top', 'middle', 'bottom', 'around', 'between']; - -export const Grid = (props: React.HTMLAttributes & { - fluid?: boolean - tagName?: string -}) => { - return React.createElement(props.tagName ?? 'div', { - ...props, - className: classNames( - props.fluid ? 'container-fluid' : 'container', - props.className, - ) - }); -} - -export type ColumnProps = { - [T in ViewportSize]?: ColumnSize -} & { - [T in `${ViewportSize}Offset`]?: number -} & { - first?: ViewportSize - last?: ViewportSize - tagName?: string -}; - -export const Col = (props: React.HTMLAttributes & ColumnProps) => { - const { - tagName = 'div', - - first, - last, - - className - } = props; - - return React.createElement(tagName, { - ...props, - className: classNames( - first ? `first-${first}` : null, - last ? `last-${first}` : null, - - ...ViewportSizes.map(size => { - let value = props[size]; - let offset = props[`${size}Offset`]; - - return ({ - [`col-${size}${_.isInteger(value) ? `-${value}` : ''}`]: !!value, - [`col-${size}-offset${_.isInteger(offset) ? `-${offset}` : ''}`]: !!offset, - }) - }), - - className - ) - }); -} - -export type RowProps = { - [T in Alignment]?: ViewportSize -} & { - reverse?: boolean, - tagName?: string -}; - -export const Row = (props: React.HTMLAttributes & RowProps) => { - const { - tagName = 'div', - reverse, - - className - } = props; - - return React.createElement(tagName, { - ...props, - className: classNames( - 'row', - { - reverse, - }, - ...Alignments.map(alignment => props[alignment] ? `${alignment}-${props[alignment]}` : null), - className - ) - }); -} \ No newline at end of file diff --git a/orbitmines.com/src/lib/syntax-highlighting/CodeBlock.tsx b/orbitmines.com/src/lib/syntax-highlighting/CodeBlock.tsx deleted file mode 100755 index 9fc6636..0000000 --- a/orbitmines.com/src/lib/syntax-highlighting/CodeBlock.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import {Highlight, Prism, themes} from "prism-react-renderer"; -import { Children } from "../typescript/React"; -import * as React from "react"; -import classNames from "classnames"; - -const highlight = (code: string) => ( - // @ts-ignore - - {({className, style, tokens, getLineProps, getTokenProps}) => ( - <> - {tokens.map((line, i) => ( -
- {line.map((token, key) => )} -
- ))} - - )} -
-) - -export type CodeBlockProps = { - code: string -} - -export const Block = ({children, className, style = {}, ...props}: Children & React.HTMLAttributes) => { - return ( -
-      {children}
-    
- ) -} - -const CodeBlock = (props: CodeBlockProps) => { - const {code} = props; - - return - {highlight(code)} - ; -}; - -export default CodeBlock; \ No newline at end of file diff --git a/orbitmines.com/src/lib/typescript/React.tsx b/orbitmines.com/src/lib/typescript/React.tsx deleted file mode 100755 index 848693c..0000000 --- a/orbitmines.com/src/lib/typescript/React.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import {ReactNode, useMemo} from "react"; - -export type Children = { children: ReactNode }; - -export type AllowReact = { - [TKey in keyof T]: T[TKey] extends string ? ReactNode : T[TKey]; -} - -export type Renderable = T | { value: T, render: (value: T) => ReactNode }; - -// TODO ; Some directionality which takes this as a value, just any function to some other. -export const Rendered = ({renderable}: { renderable: Renderable}) => { - const rendered = useMemo(() => renderable?.render ? renderable.render(renderable.value) : renderable, [renderable]); - - return <>{rendered}; -} - -export const value = (renderable: Renderable) => renderable?.render ? renderable.value : renderable; - -export function renderable(value: T, _default: (value: T) => ReactNode = (value) => value): Renderable { return { value: value, render: _default }} - -export type Predicate = (value: T, index: number, array: T[]) => unknown; \ No newline at end of file diff --git a/orbitmines.com/src/lib/typescript/Replacer.ts b/orbitmines.com/src/lib/typescript/Replacer.ts deleted file mode 100755 index 419ee97..0000000 --- a/orbitmines.com/src/lib/typescript/Replacer.ts +++ /dev/null @@ -1,3 +0,0 @@ -type Replacer = (this: any, key: string, value: any) => TResult; - -export default Replacer; diff --git a/orbitmines.com/src/profiles/FadiShawki/FadiShawki2.tsx b/orbitmines.com/src/profiles/FadiShawki/FadiShawki2.tsx deleted file mode 100644 index 2fa7f93..0000000 --- a/orbitmines.com/src/profiles/FadiShawki/FadiShawki2.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import {Content} from "../../lib/organizations/ORGANIZATIONS"; -import {Intent, Tag} from "@blueprintjs/core"; -import { Col, Row } from "../../lib/render/Layout"; -import classNames from "classnames"; -import {Reference} from "../../lib/paper/Paper"; - -export const Category = (props: { - content?: Content[], - inline?: boolean, - simple?: boolean -}) => { - const {inline, simple = false, content} = props; - - if (!props.content) - return <>; - - const Item = ({item, index}: { item: Content, index: number }) => { - return - - ; - } - - const inline_item = () => - {content.map((item, index) => )} - - - if (inline) - return inline_item(); - - const simple_item = () =>
- {/*

{name}

*/} - {content.map((item, index) => - - - - )} -
- - if (simple) - simple_item(); - - return - {content.map((item, index) => - - )} - -} - -export const pageStyles = { - // width: '1240px'; - // height: '1754px'; - width: '100%', - maxWidth: '100vw', - minHeight: '100vh', - // fontSize: '1.1rem' -}; - -export const Layer = ({zIndex, children, ...props}: any) => { - return
- {children} -
; -} diff --git a/orbitmines.com/src/profiles/profiles.ts b/orbitmines.com/src/profiles/profiles.ts deleted file mode 100644 index ef0c216..0000000 --- a/orbitmines.com/src/profiles/profiles.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {fadi_shawki} from "./FadiShawki/FadiShawki"; - -export const PROFILES = { fadi_shawki } - diff --git a/orbitmines.com/src/routes/Root.tsx b/orbitmines.com/src/routes/Root.tsx index 703ba9a..c7a2f22 100644 --- a/orbitmines.com/src/routes/Root.tsx +++ b/orbitmines.com/src/routes/Root.tsx @@ -1,17 +1,16 @@ import React from 'react'; -import {Layer, pageStyles} from "../profiles/FadiShawki/FadiShawki2"; -import { Col, Row } from "../lib/render/Layout"; import logo from "../lib/organizations/orbitmines/logo/orbitmines.logo.3000x1000.png"; import {H3, Tag} from "@blueprintjs/core"; import CustomIcon from "../lib/layout/icons/CustomIcon"; import ORGANIZATIONS from "../lib/organizations/ORGANIZATIONS"; -import {PROFILES} from "../profiles/profiles"; +import {PROFILES} from "./profiles/profiles"; import {Helmet} from "react-helmet"; import {ON_INTELLIGIBILITY} from "./papers/2022.OnIntelligibility"; import {ON_ORBITS} from "./papers/2023.OnOrbits"; import {CanvasContainer} from "../@orbitmines/Visualization"; import {_2024_02_ORBITMINES_AS_A_GAME_PROJECT} from "./archive/2024.02.OrbitMines_as_a_Game_Project"; -import {Author, Reference} from "../lib/paper/Paper"; +import {Author, Layer, pageStyles, Reference, Col, Row} from "../lib/paper/Paper"; + const Root = () => { const papers = [ON_ORBITS, ON_INTELLIGIBILITY]; diff --git a/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx b/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx index 334a40b..ff35430 100644 --- a/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx +++ b/orbitmines.com/src/routes/archive/2024.02.NGI.GrantProposal.tsx @@ -1,12 +1,10 @@ import React from 'react'; import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; -import Paper, {Arc, BR, PaperProps, Link, useCounter, Reference, Section} from "../../lib/paper/Paper"; -import {PROFILES} from "../../profiles/profiles"; -import {renderable} from "../../lib/typescript/React"; -import REFERENCES from "../../profiles/FadiShawki/FadiShawki"; +import Paper, {Arc, BR, PaperProps, Link, useCounter, Reference, Section, renderable, Row} from "../../lib/paper/Paper"; +import {PROFILES} from "../profiles/profiles"; +import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; import BlueprintIcons from "../../lib/layout/font/fonts/blueprintjs/BlueprintIcons"; -import {Row} from "../../lib/render/Layout"; export const _2024_02_NGI_GRANT_PROPOSAL: Content = { reference: { diff --git a/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx b/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx index 0d102f8..7108519 100644 --- a/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx +++ b/orbitmines.com/src/routes/archive/2024.02.OrbitMines_as_a_Game_Project.tsx @@ -2,9 +2,8 @@ import React from 'react'; import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; import {useNavigate} from "react-router-dom"; -import Paper, {Arc, BR, PaperProps, Author, Reference, Section, useCounter} from "../../lib/paper/Paper"; -import {PROFILES} from "../../profiles/profiles"; -import { Col, Row } from "../../lib/render/Layout"; +import Paper, {Arc, BR, PaperProps, Author, Reference, Section, useCounter, Col, Row} from "../../lib/paper/Paper"; +import {PROFILES} from "../profiles/profiles"; import BlueprintIcons from "../../lib/layout/font/fonts/blueprintjs/BlueprintIcons"; import CustomIcon from "../../lib/layout/icons/CustomIcon"; import {CanvasContainer} from "../../@orbitmines/Visualization"; diff --git a/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx b/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx index e207d6e..88b6b85 100755 --- a/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx +++ b/orbitmines.com/src/routes/papers/2022.OnIntelligibility.tsx @@ -1,13 +1,11 @@ import React from 'react'; -import CodeBlock from '../../lib/syntax-highlighting/CodeBlock'; import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; -import REFERENCES from "../../profiles/FadiShawki/FadiShawki"; +import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; import {useNavigate} from "react-router-dom"; -import Paper, {BR, PaperProps, Reference, Section, useCounter} from "../../lib/paper/Paper"; -import {PROFILES} from "../../profiles/profiles"; -import {Row} from "../../lib/render/Layout"; +import Paper, {BR, PaperProps, Reference, Section, useCounter, CodeBlock, Row} from "../../lib/paper/Paper"; +import {PROFILES} from "../profiles/profiles"; const { A_PROJECT_TO_FIND_THE_FUNDAMENTAL_THEORY_OF_PHYSICS, diff --git a/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx b/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx index 374e356..2986fd5 100644 --- a/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx +++ b/orbitmines.com/src/routes/papers/2023.OnOrbits.tsx @@ -2,17 +2,14 @@ import React from 'react'; import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; import ORGANIZATIONS, {Content, Viewed} from "../../lib/organizations/ORGANIZATIONS"; import {useNavigate} from "react-router-dom"; -import Paper, {BR, PaperProps, Arc, HorizontalLine, Link, useCounter, Reference, Section} from "../../lib/paper/Paper"; -import {PROFILES} from "../../profiles/profiles"; +import Paper, {BR, PaperProps, Arc, HorizontalLine, Link, useCounter, Reference, Section, Block, renderable, Row} from "../../lib/paper/Paper"; +import {PROFILES} from "../profiles/profiles"; import {ON_INTELLIGIBILITY} from "./2022.OnIntelligibility"; -import {renderable} from "../../lib/typescript/React"; import {Divider, Intent, Tag} from "@blueprintjs/core"; import {CatmullRomLine, Center, Circle, QuadraticBezierLine, Torus} from "@react-three/drei"; -import {Block} from "../../lib/syntax-highlighting/CodeBlock"; -import REFERENCES from "../../profiles/FadiShawki/FadiShawki"; +import REFERENCES from "../profiles/fadi-shawki/fadi_shawki"; import {CachedVisualizationCanvas} from '../../@orbitmines/Visualization'; import _ from 'lodash'; -import {Row} from "../../lib/render/Layout"; export const ON_ORBITS: Content = { reference: { diff --git a/orbitmines.com/src/profiles/Profile.tsx b/orbitmines.com/src/routes/profiles/Profile.tsx similarity index 95% rename from orbitmines.com/src/profiles/Profile.tsx rename to orbitmines.com/src/routes/profiles/Profile.tsx index dd16a51..e3ece40 100644 --- a/orbitmines.com/src/profiles/Profile.tsx +++ b/orbitmines.com/src/routes/profiles/Profile.tsx @@ -1,10 +1,9 @@ import React from 'react'; import {Helmet} from "react-helmet"; import {useLocation} from "react-router-dom"; -import {PaperProps, PaperView} from "../lib/paper/Paper"; -import JetBrainsMono from "../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; -import ORGANIZATIONS, {TProfile} from "../lib/organizations/ORGANIZATIONS"; -import {Children, value} from "../lib/typescript/React"; +import {PaperProps, PaperView, Children, value} from "../../lib/paper/Paper"; +import JetBrainsMono from "../../lib/layout/font/fonts/JetBrainsMono/JetBrainsMono"; +import ORGANIZATIONS, {TProfile} from "../../lib/organizations/ORGANIZATIONS"; import BlueprintIcons16 from '@blueprintjs/icons/lib/css/blueprint-icons-16.ttf'; import BlueprintIcons20 from '@blueprintjs/icons/lib/css/blueprint-icons-20.ttf'; diff --git a/orbitmines.com/src/routes/Profiles.tsx b/orbitmines.com/src/routes/profiles/Profiles.tsx similarity index 82% rename from orbitmines.com/src/routes/Profiles.tsx rename to orbitmines.com/src/routes/profiles/Profiles.tsx index ec52440..d906cea 100644 --- a/orbitmines.com/src/routes/Profiles.tsx +++ b/orbitmines.com/src/routes/profiles/Profiles.tsx @@ -1,7 +1,7 @@ import React from 'react'; import {useParams} from "react-router-dom"; -import Error from "./Error"; -import FadiShawki from "./papers/2023.FadiShawki"; +import Error from "../Error"; +import FadiShawki from "./fadi-shawki/FadiShawki"; const PROFILES: { [key: string]: any } = { 'fadi-shawki': FadiShawki, diff --git a/orbitmines.com/src/routes/papers/2023.FadiShawki.tsx b/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx similarity index 92% rename from orbitmines.com/src/routes/papers/2023.FadiShawki.tsx rename to orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx index c24cc99..b18ac5a 100755 --- a/orbitmines.com/src/routes/papers/2023.FadiShawki.tsx +++ b/orbitmines.com/src/routes/profiles/fadi-shawki/FadiShawki.tsx @@ -1,14 +1,13 @@ import React from 'react'; -import {ARTICLES_2021, ARTICLES_2022, ARTICLES_2023, ARTICLES_2024} from "../../profiles/FadiShawki/FadiShawki"; -import ORGANIZATIONS, {Viewed} from "../../lib/organizations/ORGANIZATIONS"; -import {PROFILES} from "../../profiles/profiles"; -import Profile from "../../profiles/Profile"; -import {ON_INTELLIGIBILITY} from "./2022.OnIntelligibility"; -import {Category} from '../../profiles/FadiShawki/FadiShawki2'; -import {ON_ORBITS} from "./2023.OnOrbits"; -import {CanvasContainer} from "../../@orbitmines/Visualization"; -import {_2024_02_ORBITMINES_AS_A_GAME_PROJECT} from "../archive/2024.02.OrbitMines_as_a_Game_Project"; -import {Arc, Section, Reference} from "../../lib/paper/Paper"; +import {ARTICLES_2021, ARTICLES_2022, ARTICLES_2023, ARTICLES_2024} from "./fadi_shawki"; +import ORGANIZATIONS, {Viewed} from "../../../lib/organizations/ORGANIZATIONS"; +import {PROFILES} from "../profiles"; +import Profile from "../Profile"; +import {ON_INTELLIGIBILITY} from "../../papers/2022.OnIntelligibility"; +import {ON_ORBITS} from "../../papers/2023.OnOrbits"; +import {CanvasContainer} from "../../../@orbitmines/Visualization"; +import {_2024_02_ORBITMINES_AS_A_GAME_PROJECT} from "../../archive/2024.02.OrbitMines_as_a_Game_Project"; +import {Arc, Section, Reference, Category} from "../../../lib/paper/Paper"; const FadiShawki = () => { const profile = PROFILES.fadi_shawki; diff --git a/orbitmines.com/src/profiles/FadiShawki/FadiShawki.ts b/orbitmines.com/src/routes/profiles/fadi-shawki/fadi_shawki.ts similarity index 99% rename from orbitmines.com/src/profiles/FadiShawki/FadiShawki.ts rename to orbitmines.com/src/routes/profiles/fadi-shawki/fadi_shawki.ts index 049648e..24c695a 100644 --- a/orbitmines.com/src/profiles/FadiShawki/FadiShawki.ts +++ b/orbitmines.com/src/routes/profiles/fadi-shawki/fadi_shawki.ts @@ -1,8 +1,8 @@ -import ORGANIZATIONS, {Content, ExternalProfile, TProfile, Viewed} from '../../lib/organizations/ORGANIZATIONS'; +import ORGANIZATIONS, {Content, ExternalProfile, TProfile, Viewed} from '../../../lib/organizations/ORGANIZATIONS'; // TODO: Just a crude initi\al setup while the interface is not yet workable -const REFERENCES = { +export const REFERENCES = { CALCULUS_RATIOCINATOR_VS_CHARACTERISTICA_UNIVERSALIS_THE_TWO_TRADITIONS_IN_LOGIC_REVISITED: { reference: { title: 'Calculus Ratiocinator vs. Characteristica Universalis? The Two Traditions in Logic, Revisited', diff --git a/orbitmines.com/src/routes/profiles/profiles.ts b/orbitmines.com/src/routes/profiles/profiles.ts new file mode 100644 index 0000000..4701d7d --- /dev/null +++ b/orbitmines.com/src/routes/profiles/profiles.ts @@ -0,0 +1,4 @@ +import {fadi_shawki} from "./fadi-shawki/fadi_shawki"; + +export const PROFILES = { fadi_shawki } +