dsh-git-idea 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/client/client.js +18 -0
  2. package/package.json +1 -1
package/client/client.js CHANGED
@@ -48,6 +48,24 @@ window.__ModuleLoader__.load({
48
48
  },
49
49
  }
50
50
 
51
+ /* The dynamic bridge's browser realm also handed the fragments a `styles`
52
+ symbol, and 46-css.js is written against it: one `insert(text)` that
53
+ appends a <style> element and returns the remover that `ctx.effect`
54
+ disposes with. The real client realm has no such symbol —
55
+ `dsh-client-modules` instead claims whatever <style> a factory injected
56
+ and tags it for HMR — so the prelude supplies the same one over the same
57
+ DOM. */
58
+ const styles = {
59
+ insert: function (text) {
60
+ const element = document.createElement('style')
61
+ element.textContent = text
62
+ document.head.appendChild(element)
63
+ return function () {
64
+ if (element.parentNode !== null) element.parentNode.removeChild(element)
65
+ }
66
+ },
67
+ }
68
+
51
69
  const plugin = (function () {
52
70
  return {
53
71
  apply(ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-git-idea",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "A git panel inside the DSH session: a repository chip in the composer, a panel with the branch tree, commit graph, working tree and commit detail, and a Settings page.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",