This content contains an actions slot
+Hello person who opened the dialog!
Look how nice this dialog looks!
+| + country name + | ++ region code + | ++ country code + | +
|---|---|---|
| ${nameForLocale} | +${regionCode} | +${countryCode} | +
undefined`;
+ }
+ if (typeof p === 'object' && p !== null) {
+ return JSON.stringify(p);
+ }
+ resultText = p;
+ } else {
+ resultText = prop.processor(field);
+ }
+
+ return html`${resultText}`;
+ }
+
+ constructor() {
+ super();
+ this.title = 'States';
+ }
+
+ render() {
+ const computePropName = prop => (typeof prop === 'string' ? prop : prop.name);
+ return html`
+ | ${computePropName(prop)} | `)} +
|---|
| ${this.__renderProp(prop)} | `)} +
Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays.blockBody}
+ + + + `; + } +} + + +customElements.define('page-a', PageA); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/index.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/index.js new file mode 100644 index 000000000..5c5ae99b9 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/index.js @@ -0,0 +1,30 @@ +export class OverlaysManager { + name = 'OverlayManager 2.x'; + + _blockBody = false; + + constructor() { + this._setupBlocker(); + } + + _setupBlocker() { + const blocker = document.createElement('div'); + blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;'); + blocker.innerText = `Blocker for ${this.name}`; + + const target = document.getElementById('overlay-target'); + target.appendChild(blocker); + + this.blocker = blocker; + } + + blockBody() { + this._blockBody = true; + this.blocker.style.backgroundColor = '#ff6161'; + } + + unBlockBody() { + this._blockBody = false; + this.blocker.style.backgroundColor = 'transparent'; + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/instance.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/instance.js new file mode 100644 index 000000000..c3e546133 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/instance.js @@ -0,0 +1,4 @@ +import { OverlaysManager } from './index.js'; +import { singletonManager } from 'singleton-manager'; + +export const overlays = singletonManager.get('overlays::overlays::2.x') || new OverlaysManager(); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/package.json new file mode 100644 index 000000000..5e83291f8 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/node_modules/overlays/package.json @@ -0,0 +1,4 @@ +{ + "name": "overlays", + "version": "2.0.0" +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/package.json new file mode 100644 index 000000000..cd0fdbef4 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/package.json @@ -0,0 +1,7 @@ +{ + "name": "page-b", + "version": "1.0.0", + "dependencies": { + "overlays": "^2.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/page-b.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/page-b.js new file mode 100644 index 000000000..bc65fde08 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/node_modules/page-b/page-b.js @@ -0,0 +1,49 @@ +import { LitElement, html, css } from 'lit-element'; +import { overlays } from 'overlays/instance.js'; + +export class PageB extends LitElement { + getInstance(sym, fallback) { + const ev = new CustomEvent('request-instance', { + detail: { key: sym }, + bubbles: true, + cancelable: true, + composed: true, + }); + this.dispatchEvent(ev); + return ev.detail.instance || fallback(); + } + + connectedCallback() { + super.connectedCallback(); + } + + static get styles() { + return css` + :host { + display: block; + padding: 10px; + border: 2px solid #ccc; + } + `; + } + + render() { + return html` +Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays._blockBody}
+ + + + `; + } +} + +customElements.define('page-b', PageB); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/overlayCompatibility.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/overlayCompatibility.js new file mode 100644 index 000000000..384537215 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/overlayCompatibility.js @@ -0,0 +1,70 @@ +import { OverlaysManager } from 'overlays'; +import { singletonManager } from 'singleton-manager'; +import { OverlaysManager as OverlaysManager2 } from './node_modules/page-b/node_modules/overlays/index.js'; + +let compatibleManager1; +let compatibleManager2; + +const blocker = document.createElement('div'); +blocker.setAttribute( + 'style', + 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;', +); +blocker.innerText = `Shared Blocker for App`; +document.body.appendChild(blocker); + +class CompatibleManager1 extends OverlaysManager { + constructor() { + super(); + this.name = 'Compatible1 from App'; + } + + block(sync = true) { + super.block(); + if (sync) { + compatibleManager2.blockBody(false); + } + } + + unBlock(sync = true) { + super.unBlock(); + if (sync) { + compatibleManager2.unBlockBody(false); + } + } + + _setupBlocker() { + this.blocker = blocker; + } +} + +class CompatibleManager2 extends OverlaysManager2 { + constructor() { + super(); + this.name = 'Compatible2 from App'; + } + + blockBody(sync = true) { + super.blockBody(); + if (sync) { + compatibleManager1.block(); + } + } + + unBlockBody(sync = true) { + super.unBlockBody(); + if (sync) { + compatibleManager1.unBlock(); + } + } + + _setupBlocker() { + this.blocker = blocker; + } +} + +compatibleManager1 = new CompatibleManager1(); +compatibleManager2 = new CompatibleManager2(); + +singletonManager.set('overlays::overlays::1.x', compatibleManager1); +singletonManager.set('overlays::overlays::2.x', compatibleManager2); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/package.json new file mode 100644 index 000000000..5bf693476 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-complex/package.json @@ -0,0 +1,9 @@ +{ + "name": "fail-demo-app", + "version": "1.0.0", + "dependencies": { + "@lion/core": "0.13.6", + "page-a": "^1.0.0", + "page-b": "^1.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js new file mode 100644 index 000000000..802bb6d85 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/demo-app.js @@ -0,0 +1,91 @@ +import { LitElement, css, html } from 'lit'; + +import 'page-a/page-a.js'; +import 'page-b/page-b.js'; + +class DemoApp extends LitElement { + constructor() { + super(); + this.page = 'A'; + } + + static get properties() { + return { + page: { type: String }, + }; + } + + static get styles() { + return css` + :host { + display: block; + max-width: 680px; + margin: 0 auto; + } + + nav { + padding: 0 10px 10px 10px; + } + + button { + border: none; + padding: 1rem 2rem; + background: #0069ed; + color: #fff; + font-size: 1rem; + cursor: pointer; + text-align: center; + transition: background 250ms ease-in-out, transform 150ms ease; + } + + button:hover, + button:focus { + background: #0053ba; + } + + button:focus { + outline: 1px solid #fff; + outline-offset: -4px; + } + + button:active { + transform: scale(0.99); + } + + button.active { + background: #33a43f; + } + + h1 { + text-align: center; + } + `; + } + + render() { + return html` +Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays.blockBody}
+ + + + `; + } +} + +customElements.define('page-a', PageA); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/index.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/index.js new file mode 100644 index 000000000..ea2f3b178 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/index.js @@ -0,0 +1,30 @@ +export class OverlaysManager { + name = 'OverlayManager 2.x'; + + _blockBody = false; + + constructor() { + this._setupBlocker(); + } + + _setupBlocker() { + const blocker = document.createElement('div'); + blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 180px; text-align: center;'); + blocker.innerText = `Blocker for ${this.name}`; + + const target = document.getElementById('overlay-target'); + target.appendChild(blocker); + + this.blocker = blocker; + } + + blockBody() { + this._blockBody = true; + this.blocker.style.backgroundColor = '#ff6161'; + } + + unBlockBody() { + this._blockBody = false; + this.blocker.style.backgroundColor = 'transparent'; + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/instance.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/instance.js new file mode 100644 index 000000000..f73ca3b47 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/instance.js @@ -0,0 +1,3 @@ +import { OverlaysManager } from './index.js'; + +export const overlays = new OverlaysManager(); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/package.json new file mode 100644 index 000000000..5e83291f8 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/node_modules/overlays/package.json @@ -0,0 +1,4 @@ +{ + "name": "overlays", + "version": "2.0.0" +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/package.json new file mode 100644 index 000000000..cd0fdbef4 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/package.json @@ -0,0 +1,7 @@ +{ + "name": "page-b", + "version": "1.0.0", + "dependencies": { + "overlays": "^2.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/page-b.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/page-b.js new file mode 100644 index 000000000..94a90c0c0 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/node_modules/page-b/page-b.js @@ -0,0 +1,34 @@ +import { LitElement, html, css } from 'lit-element'; +import { overlays } from 'overlays/instance.js'; + +export class PageB extends LitElement { + static get styles() { + return css` + :host { + display: block; + padding: 10px; + border: 2px solid #ccc; + } + `; + } + + render() { + return html` +Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays._blockBody}
+ + + + `; + } +} + +customElements.define('page-b', PageB); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/package.json new file mode 100644 index 000000000..5bf693476 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-fail/package.json @@ -0,0 +1,9 @@ +{ + "name": "fail-demo-app", + "version": "1.0.0", + "dependencies": { + "@lion/core": "0.13.6", + "page-a": "^1.0.0", + "page-b": "^1.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js new file mode 100644 index 000000000..057392db9 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/demo-app.js @@ -0,0 +1,93 @@ +import { LitElement, css, html } from 'lit'; + +import './overlayCompatibility.js'; + +import 'page-a/page-a.js'; +import 'page-b/page-b.js'; + +class DemoApp extends LitElement { + constructor() { + super(); + this.page = 'A'; + } + + static get properties() { + return { + page: { type: String }, + }; + } + + static get styles() { + return css` + :host { + display: block; + max-width: 680px; + margin: 0 auto; + } + + nav { + padding: 0 10px 10px 10px; + } + + button { + border: none; + padding: 1rem 2rem; + background: #0069ed; + color: #fff; + font-size: 1rem; + cursor: pointer; + text-align: center; + transition: background 250ms ease-in-out, transform 150ms ease; + } + + button:hover, + button:focus { + background: #0053ba; + } + + button:focus { + outline: 1px solid #fff; + outline-offset: -4px; + } + + button:active { + transform: scale(0.99); + } + + button.active { + background: #33a43f; + } + + h1 { + text-align: center; + } + `; + } + + render() { + return html` +Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays.blockBody}
+ + + + `; + } +} + +customElements.define('page-a', PageA); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/index.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/index.js new file mode 100644 index 000000000..a2e56314e --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/index.js @@ -0,0 +1,30 @@ +export class OverlaysManager { + name = 'OverlayManager 2.x'; + + blockBody = false; + + constructor() { + this._setupBlocker(); + } + + _setupBlocker() { + const blocker = document.createElement('div'); + blocker.setAttribute('style', 'border: 2px solid #8d0606; margin: 10px; padding: 10px; width: 140px; text-align: center;'); + blocker.innerText = `Blocker for ${this.name}`; + + const target = document.getElementById('overlay-target'); + target.appendChild(blocker); + + this.blocker = blocker; + } + + blockingBody() { + this.blockBody = true; + this.blocker.style.backgroundColor = '#ff6161'; + } + + unBlockingBody() { + this.blockBody = false; + this.blocker.style.backgroundColor = 'transparent'; + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/instance.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/instance.js new file mode 100644 index 000000000..c3e546133 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/instance.js @@ -0,0 +1,4 @@ +import { OverlaysManager } from './index.js'; +import { singletonManager } from 'singleton-manager'; + +export const overlays = singletonManager.get('overlays::overlays::2.x') || new OverlaysManager(); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/package.json new file mode 100644 index 000000000..5e83291f8 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/node_modules/overlays/package.json @@ -0,0 +1,4 @@ +{ + "name": "overlays", + "version": "2.0.0" +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/package.json new file mode 100644 index 000000000..cd0fdbef4 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/package.json @@ -0,0 +1,7 @@ +{ + "name": "page-b", + "version": "1.0.0", + "dependencies": { + "overlays": "^2.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/page-b.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/page-b.js new file mode 100644 index 000000000..41fa08ad4 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/node_modules/page-b/page-b.js @@ -0,0 +1,34 @@ +import { LitElement, html, css } from 'lit-element'; +import { overlays } from 'overlays/instance.js'; + +export class PageB extends LitElement { + static get styles() { + return css` + :host { + display: block; + padding: 10px; + border: 2px solid #ccc; + } + `; + } + + render() { + return html` +Overlays Status:
+Name: ${overlays.name}
+Blocked: ${overlays.blockBody}
+ + + + `; + } +} + +customElements.define('page-b', PageB); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/overlayCompatibility.js b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/overlayCompatibility.js new file mode 100644 index 000000000..36a9c73c0 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/overlayCompatibility.js @@ -0,0 +1,23 @@ +import { OverlaysManager } from 'overlays'; +import { singletonManager } from 'singleton-manager'; + +class CompatibleManager extends OverlaysManager { + constructor() { + super(); + this.name = 'Compatible from App'; + this.blocker.innerText = `Blocker for ${this.name}`; + } + + blockingBody() { + this.block(); + } + + unBlockingBody() { + this.unBlock(); + } +} + +const compatibleManager = new CompatibleManager(); + +singletonManager.set('overlays::overlays::1.x', compatibleManager); +singletonManager.set('overlays::overlays::2.x', compatibleManager); diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/package.json b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/package.json new file mode 100644 index 000000000..5bf693476 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/example-success/package.json @@ -0,0 +1,9 @@ +{ + "name": "fail-demo-app", + "version": "1.0.0", + "dependencies": { + "@lion/core": "0.13.6", + "page-a": "^1.0.0", + "page-b": "^1.0.0" + } +} diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/index.md b/packages/ui/docs/fundamentals/tools/singleton-manager/index.md new file mode 100644 index 000000000..c596d52a8 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/index.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../../docs/fundamentals/tools/singleton-manager/index.md) diff --git a/packages/ui/docs/fundamentals/tools/singleton-manager/overview.md b/packages/ui/docs/fundamentals/tools/singleton-manager/overview.md new file mode 100644 index 000000000..bcb433e30 --- /dev/null +++ b/packages/ui/docs/fundamentals/tools/singleton-manager/overview.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../../docs/fundamentals/tools/singleton-manager/overview.md) diff --git a/packages/ui/docs/guides/how-to/create-a-custom-field.md b/packages/ui/docs/guides/how-to/create-a-custom-field.md new file mode 100644 index 000000000..abf05508a --- /dev/null +++ b/packages/ui/docs/guides/how-to/create-a-custom-field.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/how-to/create-a-custom-field.md) diff --git a/packages/ui/docs/guides/how-to/extend-a-native-input.md b/packages/ui/docs/guides/how-to/extend-a-native-input.md new file mode 100644 index 000000000..732d29738 --- /dev/null +++ b/packages/ui/docs/guides/how-to/extend-a-native-input.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/how-to/extend-a-native-input.md) diff --git a/packages/ui/docs/guides/how-to/get-started.md b/packages/ui/docs/guides/how-to/get-started.md new file mode 100644 index 000000000..c6c257997 --- /dev/null +++ b/packages/ui/docs/guides/how-to/get-started.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/how-to/get-started.md) diff --git a/packages/ui/docs/guides/how-to/index.md b/packages/ui/docs/guides/how-to/index.md new file mode 100644 index 000000000..f277f8c7c --- /dev/null +++ b/packages/ui/docs/guides/how-to/index.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/how-to/index.md) diff --git a/packages/ui/docs/guides/index.md b/packages/ui/docs/guides/index.md new file mode 100644 index 000000000..fda6dd4b0 --- /dev/null +++ b/packages/ui/docs/guides/index.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../docs/guides/index.md) diff --git a/packages/ui/docs/guides/principles/definitions-and-terms.md b/packages/ui/docs/guides/principles/definitions-and-terms.md new file mode 100644 index 000000000..6ddd68b5b --- /dev/null +++ b/packages/ui/docs/guides/principles/definitions-and-terms.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/principles/definitions-and-terms.md) diff --git a/packages/ui/docs/guides/principles/index.md b/packages/ui/docs/guides/principles/index.md new file mode 100644 index 000000000..782a0ca05 --- /dev/null +++ b/packages/ui/docs/guides/principles/index.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/principles/index.md) diff --git a/packages/ui/docs/guides/principles/scoped-elements.md b/packages/ui/docs/guides/principles/scoped-elements.md new file mode 100644 index 000000000..fe49e687c --- /dev/null +++ b/packages/ui/docs/guides/principles/scoped-elements.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/principles/scoped-elements.md) diff --git a/packages/ui/docs/guides/principles/styling.md b/packages/ui/docs/guides/principles/styling.md new file mode 100644 index 000000000..b642e31f1 --- /dev/null +++ b/packages/ui/docs/guides/principles/styling.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/principles/styling.md) diff --git a/packages/ui/docs/guides/principles/subclasser-apis.md b/packages/ui/docs/guides/principles/subclasser-apis.md new file mode 100644 index 000000000..62c703759 --- /dev/null +++ b/packages/ui/docs/guides/principles/subclasser-apis.md @@ -0,0 +1 @@ +[=> See Source <=](../../../../../docs/guides/principles/subclasser-apis.md) diff --git a/packages/ui/docs/override.js b/packages/ui/docs/override.js new file mode 100644 index 000000000..552d7c9b9 --- /dev/null +++ b/packages/ui/docs/override.js @@ -0,0 +1,15 @@ +/** + * This will override all md files within the folder to only contain [=> See Source <=](../path/to/source.md) + */ + +import { writeFile } from 'fs/promises'; +import glob from 'glob'; + +const allFiles = glob.sync('**/*.md', { nodir: true }); +const files = allFiles; + +for (const filePath of files) { + const insert = 3 + filePath.match(/\//g).length; + const srcPath = `${'../'.repeat(insert)}docs/${filePath}`; + await writeFile(filePath, `[=> See Source <=](${srcPath})`); +}