@knight-lab/timelinejs
Advanced tools
Comparing version 3.8.17 to 3.8.18
{ | ||
"name": "@knight-lab/timelinejs", | ||
"version": "3.8.17", | ||
"version": "3.8.18", | ||
"license": "MPL-2.0", | ||
@@ -10,3 +10,3 @@ "description": "TimelineJS v3: A Storytelling Timeline built in JavaScript, made by Northwestern University Knight Lab.", | ||
"devDependencies": { | ||
"@babel/cli": "^7.10.1", | ||
"@babel/cli": "^7.14.3", | ||
"@babel/core": "^7.10.2", | ||
@@ -13,0 +13,0 @@ "@babel/preset-env": "^7.10.2", |
@@ -8,34 +8,36 @@ TimelineJS3 | ||
TimelineJS 3 is a rewrite of the popular Timeline JS software. Please be clear that this is software which "does" the same thing, but it isn't the same software, so some details will vary. See https://timeline.knightlab.com for more information. | ||
TimelineJS is a tool designed to help people with minimal technical skill tell rich, dynamic stories on the web. Most people will create timelines using the [official authoring tool](http://timeline.knightlab.com/#make) and embed their creations using a snip of HTML code offered at the end of that process. | ||
## Contributing to TimelineJS | ||
Are you trying to contribute to or develop TimelineJS3? [Here's where you should start.](https://github.com/NUKnightLab/TimelineJS3/blob/master/CONTRIBUTING.md) | ||
For users of these content management systems (CMSes), there are plugins to facilitate the embedding process: | ||
## Getting Started | ||
* [Wordpress](https://wordpress.org/plugins/knight-lab-timelinejs/) | ||
* [MediaWiki](https://www.mediawiki.org/wiki/Extension:Modern_Timeline) | ||
* [Drupal](https://www.drupal.org/docs/8/modules/views-timelinejs) | ||
The [official documentation for embedding a Timeline in your page instead of using an embed](https://timeline.knightlab.com/docs/instantiate-a-timeline.html) is now maintained on the main TimelineJS website. | ||
## Getting Started | ||
## Options | ||
General users of TimelineJS should consult [timeline.knightlab.com](https://timeline.knightlab.com) for instructions and documentation. Information on GitHub is primarily directed at those who are interested in working with the TimelineJS source code. | ||
The [official documentation for configuration options](https://timeline.knightlab.com/docs/options.html) is now maintained on the main TimelineJS website. | ||
The [authoritative documentation list](https://timeline.knightlab.com/docs/) is also on the main website, but here are some direct links which may be useful: | ||
* [Available media types](https://timeline.knightlab.com/docs/media-types.html), relevant to users of any technical level | ||
* [Instantiate a Timeline in your page instead of using an embed](https://timeline.knightlab.com/docs/instantiate-a-timeline.html) | ||
* [Configuration options](https://timeline.knightlab.com/docs/options.html) (for more technical users) | ||
* [JSON configuration file format](https://timeline.knightlab.com/docs/json-format.html) for those who prefer not to use Google Sheets | ||
## Data file | ||
The [official documentation for the JSON format](https://timeline.knightlab.com/docs/json-format.html) is now maintained on the main TimelineJS website. | ||
## Contributing to TimelineJS | ||
Are you trying to contribute to or develop TimelineJS3? [Here's where you should start.](https://github.com/NUKnightLab/TimelineJS3/blob/master/CONTRIBUTING.md) | ||
## API | ||
See API doc here: https://github.com/NUKnightLab/TimelineJS3/blob/master/API.md | ||
## Media Types | ||
For users who instantiate a timeline in a page (as opposed to using the iframe embed model), [this page](https://github.com/NUKnightLab/TimelineJS3/blob/master/API.md) roughly documents TimelineJS's JavaScript API, but note that because TimelineJS's primary use case is the embedded iframe, some of these methods have not been thoroughly tested. | ||
The [official documentation for available media types](https://timeline.knightlab.com/docs/media-types.html) is now maintained on the main TimelineJS website. | ||
## Use via ES6 modules/webpack | ||
To use in a project that uses ES6 modules and webpack, import the `Timeline` class and the CSS as follows | ||
### Extending Media Types | ||
* Create a new class for the media type in `source/js/media/type`. It's easiest to duplicate an existing one and change the filename and classname. | ||
* Add the new file to the code-kit compile list inside the main `TL.Timeline.js` file. Code-kit uses the following language to prepend the file to the compile `// @codekit-prepend "media/types/TL.Media.YourMediaTypeName.js";` | ||
* Add a new object to the `media_types` array in `source/js/media/TL.MediaType.js`. Make sure to have the correct class name in `cls` and use `match_str` as a regex to help timeline figure out what type of media the given url is. | ||
* If you want icons for the media to show up in the Timeline, then you will also need to add an icon class to `source/less/icons/Icons.less` that has the name `.tl-icon-yourmediatypename`. | ||
```js | ||
import { Timeline } from '@knight-lab/timelinejs'; | ||
import '@knight-lab/timelinejs/dist/css/timeline.css'; | ||
``` |
@@ -9,4 +9,4 @@ # Steps to cut a new release of the TimelineJS JavaScript lbirary | ||
1. Push all changes to GitHub | ||
1. Execute `npm run stage_latest`, which creates both a versioned edition of the library and a copy of it in the `/latest/` directory of the CDN repository. | ||
1. Execute `npm publish` (permissions required) | ||
1. Execute `npm run stage_latest`, which creates both a versioned edition of the library and a copy of it in the `/latest/` directory of the CDN repository. | ||
1. Change directories to the local copy of the `cdn.knightlab.com` repository, to which files were copied by the previous step | ||
@@ -33,2 +33,2 @@ 1. `git add app/libs/timeline3` to add the new version and updated `latest` to Git | ||
Note that releases of the JavaScript library are independent from updates to `timeline.knightlab.com`, which is deployed | ||
Note that releases of the JavaScript library are independent from updates to `timeline.knightlab.com`, which is deployed using `fab deploy:prd` in the python environment. |
@@ -62,3 +62,3 @@ { | ||
"loading_timeline": "加载时间线... ", | ||
"swipe_to_navigate": "左右撥來瀏覽<br><span class='tl-button'>OK</span>" | ||
"swipe_to_navigate": "左右拨来浏览<br><span class='tl-button'>OK</span>" | ||
}, | ||
@@ -65,0 +65,0 @@ "dateformats": { |
@@ -769,12 +769,2 @@ import * as DOM from "../dom/DOM" | ||
_onTimeNavLoaded() { | ||
this._loaded.timenav = true; | ||
this._onLoaded(); | ||
} | ||
_onStorySliderLoaded() { | ||
this._loaded.storyslider = true; | ||
this._onLoaded(); | ||
} | ||
_onLoaded() { | ||
@@ -781,0 +771,0 @@ if (this._loaded.storyslider && this._loaded.timenav) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
2
38322
43
5017708
332
4