- improve support for
viteprojects
- use
.min.jsfiles to load addition languages at runtime - an optional CDN can be provided instead of
https://unpkg.com/prismjs@latestthrough a global variablewindow.prismjs_cdnto fetch additional languages
- init and add new
terminalstyle "Papyrs" - update list of supported languages
- bump dependencies
- bump
primsjsand list of supported languages - replace deprecated
dist-custom-elements-bundlewithdist-custom-elements
- component does not support an
editablemode anymore
i.e. setting the property editable to true won't turn the shadowed code as contenteditable anymore!
Instead, if editable is set to true, it will only display an "edit" button above (bottom + right) the code.
If the button is triggered, an event editCode will be emitted. Edition itself has to be implemented by the consumer.
- lighter
box-shadowdefault for host
- clean zero width spaces on copy
- fallback to JavaScript to display code anyway if the main language or a required one cannot be loaded
- definitely solve required scripts loading if multiple components with the same complex languages are use in the same page
- miscellaneous languages on the same page and loading
- required languages scripts need to be loaded before loading main language script (#1387)
- bump
prismjs - bump
@deckdeckgo/utils
- focus and text selection if editable
- move
catchTabfunction to utils
- update list of code supported by prismjs
- editable content: support for html template as code block
- editable content: new lines duplication
- output custom elements as a single bundle (
dist-custom-elements-bundle) - bump dependencies
- add
widthandheightCSS variables for the shadowed code block
- adaptive header size (
eminstead ofpx)
- in case of overlapping highlighted rows, highlight from lowest
- property
revealProgressshould be mutable
- remove fetch code through an url*
- highlight lines per default not through background but, with more contrast against those not highlighted ("highlight opacity 1, no highlighted opacity 0.32")
- support dash to highlight lines too (example: 1 4-8 12,18 22 26-32)
- animate highlight with methods
nextHighlightandprevHighlight(this will "focus" the highlight through the groups) - integrate functions and properties to animate the component when used in DeckDeckGo presentations
- extract some functions to utils
- I removed this feature because I think it is really rarely used and, it can simplify the code base which had becomes quite complicated for such a component.
- better support for JSX / HTML markup when component editable
- add new CSS variable
--deckgo-editable-cursor
- add new CSS variable
--deckgo-highlight-code-line-height
- expose const
deckdeckgoHighlightCodeLanguagesto make the list of supported languages programmatically readable
- improve
highlight-linesto support single digit line (as for example1,1or1accepted) - update languages list
- on content editable
input, debounce the copy of the changes to theslot
- carbon toolbar spacing if not displayed
Some new features related to the editable mode:
- make the shadowed
codeeditable instead ofslot(less quirky ui) - on click on the host component, focus the editable
code - tab support
- display a
console.errorif the language is not supported
- support alias (such as
htmlformarkup) - load alias required scripts
- required scripts loading race condition
- cursor text if set as editable
- new style to hide characters in ubuntu bar buttons
- ubuntu styling options variables renamed
- es5 has been dropped with v2, update
unpkgreference
- added the ability to toggle the Carbon toolbar and adjust the margin (#873)
- IE11, Edge 16-18 and Safari 10 not supported
- load required scripts for prismjs (#848)
- update dependencies including prism v1.21.0
- set default scrollbar (overflow) behavior to
autoinstead ofscroll - host
displayset asblock
- line numbers color inherits code's comments color
- when highlighting, highlight only code not line numbers
- themes for the carbon terminals
- update Stencil for Gatsby build
- if prism script did not load, do not keep reference in DOM
- make code white-space a css variable (#707)
- PrismJS CSS import into bundle
- update dependencies
- republish component bundle to fix loading of '~prismjs/themes/prism.css'
To infinity and beyond 🚀
- update dependencies
- CSS typo
- CSS variable misspelled
- require @deckdeckgo/utils rc.3
- property
carbonrenamed toterminal(default display remains the same)
- new optional terminal style "Ubuntu" (#623)
- if the language definition doesn't exist or if unpkg is down, display code anyway
- as of now, code will be per default displayed in a stylish card. you could opt out setting the property
carbontofalse(#525)
- missing place holder (not displayed)
- wrong code highlight when line numbers are off (#423)
- display code container as
blockper default
- update to most recent dependencies
The first users began to test, and to create content in, our web open source editor for presentations (studio)
- add some CSS4 variables to style the code's container
- improve lines highlighting detection with ResizeObserver for modern browsers
- the component displayed line numbers from 1 but the highlight used to expect line numbers from 0. this is now fixed, highlight will also begin with 1.
- add empty lines if line numbers has to be displayed to avoid sizing problem regarding font-size
- display optional line numbers #115
- upgrade to Stencil One
- move to the org scoped package
@deckdeckgo/highlight-code
- add a default color for the code highlighting background
- add new properties and events in case you would like optionally set the code block as
editable
- style: add a variable for the display of the shadowed code element (e00a3ea)
1.0.0-alpha.11 (2019-02-11)
- refactor CSS4 margin variable to give access to the all margin element not just margin-bottom ((ec4d260)[https://github.com/deckgo/deckdeckgo-highlight-code/commit/ec4d2602d3fa10e8e1ddf0ee20790d1fd6646720])
1.0.0-alpha.10 (2019-02-01)
- add a method to load or reload the component (ab11a8c)
- loading of component with src and particular language (ed88c8e)
- prevent error in case language is set as empty (3790fc9)
1.0.0-alpha.9 (2019-02-01)
- if not shadowed the component was not compatible if used in other shadowed components, therefore rollback to a shadowed component (#5)
- add height new CSS4 variables to style the highlighted code (#5)
1.0.0-alpha.8 (2019-02-01)
- when the component was used in shadowed component, sometimes the slot content was not loaded (6df0d0e)
1.0.0-alpha.7 (2019-02-01)
- this Web Component isn't shadowed anymore to give you full access to its style (#5)
- synchronize load languages across multiple components (44fac83)
1.0.0-alpha.6 (2019-01-31)
- export anchor interface declaration (680a2d3)
1.0.0-alpha.5 (2019-01-23)
- highlight code lines: first element might be a text (#4)
1.0.0-alpha.4 (2019-01-23)
1.0.0-alpha.3 (2019-01-20)
- highlight code lines (#1)
1.0.0-alpha.2 (2019-01-20)
- this Web Component doesn't provide a scroll assist method anymore but rather provide a method
findNextAnchor()which would provide you the information about the next anchor position to scroll to