-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deploying to gh-pages from @ 70eeedd 🚀
- Loading branch information
Showing
14 changed files
with
31 additions
and
25 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
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,3 +1,3 @@ | ||
/** Do not edit this file manually. It's generated during build process. */ | ||
export const PACKAGE_NAME = 'blocks'; | ||
export const PACKAGE_VERSION = '0.30.0'; | ||
export const PACKAGE_VERSION = '0.30.1'; |
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 |
---|---|---|
|
@@ -86,7 +86,7 @@ <h2 id="customization">Customization</h2> | |
</ul> | ||
<p>You can redefine styling or any other setting using custom CSS file. It's easy to discover proper elements and their selectors using developer tools in your browser.</p> | ||
<p>Custom CSS-file example:</p> | ||
<pre><code class="language-css"><span class="hljs-keyword">@import</span> url(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-regular.min.css'</span>); | ||
<pre><code class="language-css"><span class="hljs-keyword">@import</span> url(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-regular.min.css'</span>); | ||
|
||
lr-modal { | ||
<span class="hljs-attribute">border</span>: <span class="hljs-number">2px</span> solid <span class="hljs-number">#f00</span>; | ||
|
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 |
---|---|---|
|
@@ -82,12 +82,12 @@ <h2 id="script-tag-approach">Script tag approach</h2> | |
</ul> | ||
</blockquote> | ||
<p>Connect script to your document:</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].0/web/blocks-browser.min.js"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].1/web/blocks-browser.min.js"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span> | ||
</code></pre> | ||
<p>Then you can use blocks in your application markup.</p> | ||
<p>File uploader example:</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-file-uploader-regular</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-regular.min.css"</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-regular.min.css"</span> | ||
></span> | ||
<span class="hljs-tag"></<span class="hljs-name">lr-file-uploader-regular</span>></span> | ||
</code></pre> | ||
|
@@ -98,20 +98,20 @@ <h2 id="dynamic-script-connection-types-support">Dynamic script connection (type | |
<p>Then use <code>connectBlocksFrom</code> function to connect blocks:</p> | ||
<pre><code class="language-js"><span class="hljs-keyword">import</span> { connectBlocksFrom } <span class="hljs-keyword">from</span> <span class="hljs-string">'@uploadcare/blocks/abstract/connectBlocksFrom.js'</span>; | ||
|
||
<span class="hljs-title function_">connectBlocksFrom</span>(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].0/web/blocks-browser.min.js'</span>); | ||
<span class="hljs-title function_">connectBlocksFrom</span>(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].1/web/blocks-browser.min.js'</span>); | ||
</code></pre> | ||
<p>That's it! Now you can use components for placing into html, like this:</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-file-uploader-inline</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-inline.min.css"</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-inline.min.css"</span> | ||
<span class="hljs-attr">class</span>=<span class="hljs-string">"my-config-class"</span> | ||
></span><span class="hljs-tag"></<span class="hljs-name">lr-file-uploader-inline</span>></span> | ||
</code></pre> | ||
<p>You may need to implement some logic, which depends on connected blocks or get access directly to the imported components. Since <code>connectBlocksFrom</code> returns <code>Promise</code>, place all you need using <code>.then()</code></p> | ||
<pre><code class="language-js"><span class="hljs-keyword">import</span> { connectBlocksFrom } <span class="hljs-keyword">from</span> <span class="hljs-string">'@uploadcare/blocks/abstract/connectBlocksFrom.js'</span>; | ||
|
||
<span class="hljs-keyword">const</span> <span class="hljs-variable constant_">STYLES</span> = <span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-regular.min.css'</span>; | ||
<span class="hljs-keyword">const</span> <span class="hljs-variable constant_">STYLES</span> = <span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-regular.min.css'</span>; | ||
|
||
<span class="hljs-title function_">connectBlocksFrom</span>(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].0/web/blocks-browser.min.js'</span>).<span class="hljs-title function_">then</span>( | ||
<span class="hljs-title function_">connectBlocksFrom</span>(<span class="hljs-string">'https://unpkg.com/@uploadcare/[email protected].1/web/blocks-browser.min.js'</span>).<span class="hljs-title function_">then</span>( | ||
<span class="hljs-function">(<span class="hljs-params">blocks</span>) =></span> { | ||
<span class="hljs-keyword">if</span> (!blocks) { | ||
<span class="hljs-keyword">return</span>; <span class="hljs-comment">// To avoid errors in SSR case</span> | ||
|
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 |
---|---|---|
|
@@ -108,19 +108,19 @@ <h3 id="typescript-support">Typescript support</h3> | |
<h2 id="🚀-getting-started">🚀 Getting started</h2> | ||
<h3 id="from-cdn">From CDN</h3> | ||
<ol> | ||
<li>Connect Uploadcare Blocks directly from your document replacing <code>0.30.0</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest version</a> of the package:</li> | ||
<li>Connect Uploadcare Blocks directly from your document replacing <code>0.30.1</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest version</a> of the package:</li> | ||
</ol> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="language-javascript"> | ||
<span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-variable constant_">LR</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].0/web/blocks.min.js'</span>; | ||
<span class="hljs-keyword">import</span> * <span class="hljs-keyword">as</span> <span class="hljs-variable constant_">LR</span> <span class="hljs-keyword">from</span> <span class="hljs-string">'https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].1/web/blocks.min.js'</span>; | ||
|
||
<span class="hljs-variable constant_">LR</span>.<span class="hljs-title function_">registerBlocks</span>(<span class="hljs-variable constant_">LR</span>); | ||
</span><span class="hljs-tag"></<span class="hljs-name">script</span>></span> | ||
</code></pre> | ||
<ol start="2"> | ||
<li>Start using Uploadcare Blocks in your application markup (don't forget to specify <code>0.30.0</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest one</a>):</li> | ||
<li>Start using Uploadcare Blocks in your application markup (don't forget to specify <code>0.30.1</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest one</a>):</li> | ||
</ol> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-file-uploader-regular</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].0/web/lr-file-uploader-regular.min.css"</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].1/web/lr-file-uploader-regular.min.css"</span> | ||
<span class="hljs-attr">ctx-name</span>=<span class="hljs-string">"my-uploader"</span> | ||
></span> | ||
<span class="hljs-tag"></<span class="hljs-name">lr-file-uploader-regular</span>></span> | ||
|
@@ -138,10 +138,10 @@ <h3 id="from-npm">From NPM</h3> | |
<span class="hljs-variable constant_">LR</span>.<span class="hljs-title function_">registerBlocks</span>(<span class="hljs-variable constant_">LR</span>); | ||
</code></pre> | ||
<ol start="3"> | ||
<li>Start using Uploadcare Blocks in your application markup and replace <code>0.30.0</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest version</a> of the package:</li> | ||
<li>Start using Uploadcare Blocks in your application markup and replace <code>0.30.1</code> with the <a target='_blank' href="https://github.com/uploadcare/blocks/releases">latest version</a> of the package:</li> | ||
</ol> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-file-uploader-inline</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].0/web/lr-file-uploader-inline.min.css"</span> | ||
<span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/@uploadcare/[email protected].1/web/lr-file-uploader-inline.min.css"</span> | ||
<span class="hljs-attr">ctx-name</span>=<span class="hljs-string">"my-uploader"</span> | ||
></span> | ||
<span class="hljs-tag"></<span class="hljs-name">lr-file-uploader-inline</span>></span> | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -72,7 +72,7 @@ <h2 id="💎-solution-benefits">💎 Solution benefits</h2> | |
<p><re-htm src="./demo.htm"></re-htm></p> | ||
<h2 id="quick-start">Quick start</h2> | ||
<p>Connect script:</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].0/web/lr-img.min.js"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].1/web/lr-img.min.js"</span> <span class="hljs-attr">type</span>=<span class="hljs-string">"module"</span>></span><span class="hljs-tag"></<span class="hljs-name">script</span>></span> | ||
</code></pre> | ||
<p>Add basic settings:</p> | ||
<pre><code class="language-css">lr-<span class="hljs-selector-tag">img</span> { | ||
|
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 |
---|---|---|
|
@@ -115,7 +115,7 @@ <h1 id="🛠-configuration"><a name="configuration"></a>🛠 Configuration</h1> | |
<h2 id="general">General</h2> | ||
<p>All configurations, localization texts, icons, and styling are placed into CSS file (if you aren't familiar with this concept, read about <a href="../../get-started/configuration/">blocks configuration</a>), so you should connect the default one (or create your own):</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">style</span>></span><span class="language-css"> | ||
<span class="hljs-keyword">@import</span> url(<span class="hljs-attribute">https</span>://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-regular<span class="hljs-selector-class">.min</span><span class="hljs-selector-class">.css</span>); | ||
<span class="hljs-keyword">@import</span> url(<span class="hljs-attribute">https</span>://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-regular<span class="hljs-selector-class">.min</span><span class="hljs-selector-class">.css</span>); | ||
<span class="hljs-selector-class">.my-settings</span> { | ||
<span class="hljs-attr">--ctx-name</span>: <span class="hljs-string">'my-uploader'</span>; | ||
<span class="hljs-attr">--cfg-pubkey</span>: <span class="hljs-string">'demopublickey'</span>; | ||
|
@@ -431,7 +431,7 @@ <h2 id="component-styles">Component styles</h2> | |
<h2 id="shadow-dom">Shadow DOM</h2> | ||
<p>If you need additional isolation and styling security levels, you can get it with Shadow DOM. | ||
To enable it and encapsulate all styles into separated scope, use the <code>css-src</code> attribute:</p> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-uploader</span> <span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].0/web/file-uploader-regular.min.css"</span>></span> | ||
<pre><code class="language-html"><span class="hljs-tag"><<span class="hljs-name">lr-uploader</span> <span class="hljs-attr">css-src</span>=<span class="hljs-string">"https://unpkg.com/@uploadcare/[email protected].1/web/file-uploader-regular.min.css"</span>></span> | ||
<span class="hljs-tag"></<span class="hljs-name">lr-uploader</span>></span> | ||
</code></pre> | ||
<p><br/><br/><br/></p> | ||
|
Oops, something went wrong.