This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactored into Monorepo * Fixed tests * Refactoring types module to not be compiled and pure types * Removed log file * Removed dots from package exports * Tweak workflow * Tweak workflow * Tweak workflow * Fixed type tests * Fixed missing module * Failing tests - annotation normalization problems, added context * Added some more context * Added workflow step * Publish config * Lerna version * Lerna version * Visibility * v0.1.0 * Revert v1.0.0 * v0.1.0 * Added relase to github * Made sure pre-release is before tests * ping * ping * Debug * Debug * Debug * Debug * Debug * Debug * debug * debug * First test * Test fix * Restore full workflow * Adding some extra context * Adding some extra context (1) * Update main.workflow * Update main.workflow * Workflow * Planning for react module * Further planning of React package * First react example prototype * Remove deploy pull request * Fixed import * Plan for selectors
- Loading branch information
Showing
155 changed files
with
15,092 additions
and
1,362 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,33 @@ | ||
workflow "Hyperion" { | ||
workflow "Build and test" { | ||
on = "push" | ||
resolves = ["Yarn tests"] | ||
resolves = ["Yarn tests", "Typescript types tests"] | ||
} | ||
|
||
action "Yarn install" { | ||
uses = "docker://node:8" | ||
args = "yarn install" | ||
} | ||
|
||
action "Yarn build" { | ||
uses = "docker://node:8" | ||
args = "yarn build" | ||
needs = ["Yarn install"] | ||
} | ||
|
||
action "Yarn tests" { | ||
uses = "docker://node:8" | ||
args = "yarn test" | ||
needs = ["Yarn build"] | ||
} | ||
|
||
action "Typescript types tests" { | ||
uses = "docker://node:8" | ||
args = "yarn test-types" | ||
needs = ["Yarn install"] | ||
} | ||
|
||
action "Deploy package to NPM" { | ||
uses = "stephenwf/module-release-action@master" | ||
secrets = ["NPM_AUTH"] | ||
needs = ["Yarn install"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
node_modules | ||
dist | ||
coverage | ||
.cache | ||
yarn-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
workspaces-experimental true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
__tests__/utility/__snapshots__/iiif-normalize-test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`utility/normalize it can normalize a simple manifest 1`] = ` | ||
Object { | ||
"Annotation": Object { | ||
"https://example.org/iiif/book1/annotation/p0001-image": Object { | ||
"body": Array [ | ||
Object { | ||
"format": "image/png", | ||
"height": 1800, | ||
"id": "http://iiif.io/api/presentation/2.1/example/fixtures/resources/page1-full.png", | ||
"type": "Image", | ||
"width": 1200, | ||
}, | ||
], | ||
"id": "https://example.org/iiif/book1/annotation/p0001-image", | ||
"motivation": Array [ | ||
"painting", | ||
], | ||
"target": "https://example.org/iiif/book1/canvas/p1", | ||
"type": "Annotation", | ||
}, | ||
}, | ||
"AnnotationCollection": Object {}, | ||
"AnnotationPage": Object { | ||
"https://example.org/iiif/book1/page/p1/1": Object { | ||
"behaviour": Array [], | ||
"homepage": null, | ||
"id": "https://example.org/iiif/book1/page/p1/1", | ||
"items": Array [ | ||
Object { | ||
"id": "https://example.org/iiif/book1/annotation/p0001-image", | ||
"type": "Annotation", | ||
}, | ||
], | ||
"label": null, | ||
"logo": Array [], | ||
"metadata": Array [], | ||
"motivation": null, | ||
"rendering": Array [], | ||
"requiredStatement": null, | ||
"rights": null, | ||
"seeAlso": Array [], | ||
"service": Array [], | ||
"summary": null, | ||
"thumbnail": Array [], | ||
"type": "AnnotationPage", | ||
}, | ||
}, | ||
"Canvas": Object { | ||
"https://example.org/iiif/book1/canvas/p1": Object { | ||
"annotations": Array [], | ||
"behaviour": Array [], | ||
"duration": 0, | ||
"height": 1800, | ||
"homepage": null, | ||
"id": "https://example.org/iiif/book1/canvas/p1", | ||
"items": Array [ | ||
Object { | ||
"id": "https://example.org/iiif/book1/page/p1/1", | ||
"type": "AnnotationPage", | ||
}, | ||
], | ||
"label": null, | ||
"logo": Array [], | ||
"metadata": Array [], | ||
"motivation": null, | ||
"navDate": null, | ||
"partOf": Array [], | ||
"posterCanvas": null, | ||
"rendering": Array [], | ||
"requiredStatement": null, | ||
"rights": null, | ||
"seeAlso": Array [], | ||
"service": Array [], | ||
"summary": null, | ||
"thumbnail": Array [], | ||
"type": "Canvas", | ||
"width": 1200, | ||
}, | ||
}, | ||
"Collection": Object {}, | ||
"ContentResource": Object { | ||
"http://myhomepage.com": Object { | ||
"id": "http://myhomepage.com", | ||
"type": "ContentResource", | ||
}, | ||
}, | ||
"Manifest": Object { | ||
"https://example.org/iiif/book1/manifest": Object { | ||
"@context": Array [ | ||
"http://www.w3.org/ns/anno.jsonld", | ||
"http://iiif.io/api/presentation/{{ page.major }}/context.json", | ||
], | ||
"annotations": Array [], | ||
"behaviour": Array [], | ||
"homepage": Object { | ||
"id": "http://myhomepage.com", | ||
"type": "ContentResource", | ||
}, | ||
"id": "https://example.org/iiif/book1/manifest", | ||
"items": Array [ | ||
Object { | ||
"id": "https://example.org/iiif/book1/canvas/p1", | ||
"type": "Canvas", | ||
}, | ||
], | ||
"label": Object { | ||
"en": Array [ | ||
"Image 1", | ||
], | ||
}, | ||
"logo": Array [], | ||
"metadata": Array [], | ||
"motivation": null, | ||
"navDate": null, | ||
"partOf": Array [], | ||
"posterCanvas": null, | ||
"rendering": Array [], | ||
"requiredStatement": null, | ||
"rights": null, | ||
"seeAlso": Array [], | ||
"service": Array [], | ||
"start": null, | ||
"structures": Array [], | ||
"summary": null, | ||
"thumbnail": Array [], | ||
"type": "Manifest", | ||
"viewingDirection": "left-to-right", | ||
}, | ||
}, | ||
"Range": Object {}, | ||
"Selector": Object {}, | ||
"Service": Object {}, | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "react-context-example", | ||
"private": true, | ||
"version": "0.1.0", | ||
"dependencies": { | ||
"@hyperion-framework/vault": "^0.1.0", | ||
"@hyperion-framework/react-vault": "^0.1.0", | ||
"react": "^16.8.0", | ||
"react-dom": "^16.8.0" | ||
}, | ||
"scripts": { | ||
"start": "fesk-start", | ||
"build": "fesk-build" | ||
}, | ||
"devDependencies": { | ||
"@fesk/scripts": "^1.1.8" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { useExternalManifest, ManifestProvider, useManifest } from '@hyperion-framework/react-vault'; | ||
import { manifestContext, createSelector } from '@hyperion-framework/vault'; | ||
|
||
const manifestLabelSelector = createSelector({ | ||
context: [manifestContext], | ||
selector: ((state, ctx) => { | ||
return ctx.manifest.label.en.join(''); | ||
}) | ||
}); | ||
|
||
function ManifestLabel() { | ||
const label = useManifest(manifestLabelSelector); | ||
|
||
return <div>{label}</div> | ||
} | ||
|
||
function App() { | ||
const { isLoaded, id } = useExternalManifest('https://adam-digirati.github.io/balenciaga1-behaviors.json'); | ||
|
||
if (!isLoaded) { | ||
return <div>Loading...</div> | ||
} | ||
|
||
return ( | ||
<ManifestProvider id={id}> | ||
Hello react. | ||
<ManifestLabel/> | ||
</ManifestProvider> | ||
); | ||
|
||
} | ||
|
||
export default App; |
Oops, something went wrong.