lookbook 1.0.0.rc.2 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03c7bc590a271bc1db49e9636c5c6a274ec45f9a449aaf811695e74c4de52aaa
4
- data.tar.gz: a23446857053cf0789adf7ac0644ea3fe8968a8a7fee7c25e2f688ff5e15b7b5
3
+ metadata.gz: ff67ef3eb53b5a6605d46fdf186f859709112f09debfc72bab1a3f766475ea7b
4
+ data.tar.gz: c592dfa672ad57776c5c9ffb38dafc82998c51ca68c02fcfe7b7bc980e519ccd
5
5
  SHA512:
6
- metadata.gz: b1eac6af6a1e73ef6c44aa637ca1552bba495d3f07a402ff2bb60d79606c391aaa4a54eeed8e44896273007cb9261cffe57d40b135951b94ea57919be9581d44
7
- data.tar.gz: 70fd860db9aa315acd81b182188f3b7f53a38098f33a57bd7b4d8839437de932bc93462a5d00acd30195790157f8af70e7f8313778663bf784ffb3d8fb9437a1
6
+ metadata.gz: 7b0fc0d0a54945f24a543d18b44e1734453e166286823e85f17ed9f5d51235e3e4cd9733287089dc76c58617047fd4835a1051c5dbe8836c05fc8b1d7c36ec3f
7
+ data.tar.gz: 551d4744fb346cb835c53e26167f4a6e2fa71b612d2b212a7968b802775ac91655e15ac4f1ae4faf3d2fada0a95d7f7e1b7ecd581adb33b0ac49941cf508ccc1
data/README.md CHANGED
@@ -1,83 +1,52 @@
1
- # Lookbook v1.0
1
+ # Lookbook
2
2
 
3
3
  <div>
4
- <a href="https://rubygems.org/gems/lookbook"><img src="https://img.shields.io/gem/v/lookbook?include_prereleases" alt="Gem version"></a>
5
- <img src="https://github.com/allmarkedup/lookbook/actions/workflows/ci.yml/badge.svg?branch=v1.0-beta" alt="CI status">
4
+ <a href="https://rubygems.org/gems/lookbook"><img src="https://img.shields.io/gem/v/lookbook" alt="Gem version"></a>
5
+ <a href="https://github.com/allmarkedup/lookbook/actions/workflows/ci.yml"><img src="https://github.com/allmarkedup/lookbook/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status"></a>
6
6
  </div>
7
7
  <br>
8
8
 
9
- > **This is the Lookbook v1.0 BETA development branch.**<br>
10
- >_For code and documentation for the current stable release see the [main branch](https://github.com/allmarkedup/lookbook/tree/main)._
9
+ A tool to help browse, develop, test & document [ViewComponents](https://viewcomponent.org/) in Ruby on Rails apps.
11
10
 
11
+ ## Documentation
12
12
 
13
- ## Get started
13
+ **Lookbook (v1.x)** documentation: **[https://lookbook.build](https://lookbook.build)**
14
14
 
15
- If you are already using Lookbook in your project, just update the Lookbook gem to the latest beta release and then head over to the [beta documentation site](https://beta.lookbook.build/) to read more about the new features.
15
+ > _Looking for v0.9.x docs? [Head over here](https://github.com/allmarkedup/lookbook/tree/0.9.x)._
16
16
 
17
- ```ruby
18
- gem "lookbook", ">= 1.0.0.beta.8"
19
- ```
20
17
 
21
- If you are **new to Lookbook** then check out the <a href="https://beta.lookbook.build/guide/quick-start/">v1.0 quick start guide</a> for more detailed instructions on installing Lookbook in your project
18
+ ## Demo
22
19
 
20
+ **Online Demo:** [https://lookbook-demo-app.herokuapp.com/lookbook](https://lookbook-demo-app.herokuapp.com/lookbook)
23
21
 
24
- <h4>Useful Resources</h4>
22
+ [![Lookbook UI](.github/assets/lookbook_screenshot_v1.0_beta.png)](https://lookbook-demo-app.herokuapp.com/lookbook/)
25
23
 
26
- * 👉 <a href="https://beta.lookbook.build/">v1.0 docs</a>
27
- * 👉 <a href="https://lookbook-demo-app-v1-0-beta.herokuapp.com/lookbook">v1.0 demo app</a> <em>(The repo for the demo <a href="https://github.com/allmarkedup/lookbook-demo/tree/v1.0-beta">is here</a> if you want to dig in further)</em>
28
24
 
25
+ ## Development
29
26
 
30
-
31
- ## Changes and new features in v1.0
32
-
33
- Lookbook v1.0 includes a completely re-written UI, many under-the hood improvements and a some exciting new customisation options.
34
-
35
- ### Frontend changes:
36
-
37
- * Completely re-written UI - now built with ViewComponents
38
- * New [UI themes and customisation options](https://beta.lookbook.build/guide/themes/)
39
- * Improved small-screen/mobile view
40
- * Debug menu
41
- * ...and many other small visual and usability improvements
42
-
43
- ### New options for extending Lookbook:
44
-
45
- * Define [custom tags](https://beta.lookbook.build/guide/extend/tags/) for preview file annotations
46
- * Create [your own tab panels](https://beta.lookbook.build/guide/extend/panels/) - with complete control over content/layout and access to all Lookbook data
47
- * Use [lifecycle hooks](https://beta.lookbook.build/guide/extend/hooks/) to run your own code when Lookbook starts up, when files change or at shutdown
48
-
49
- ### Other changes
50
-
51
- * 'Workbench' app for developing Lookbook's UI components in Lookbook
52
- * New Rspec-based test suite and dummy app
53
- * All new documentation site built using [Bridgetown](https://www.bridgetownrb.com/)
54
-
55
-
56
- [![Lookbook UI](.github/assets/lookbook_screenshot_v1.0_beta.png)](https://lookbook-demo-app-v1-0-beta.herokuapp.com/lookbook/)
57
-
58
- ## Workbench
59
-
60
- As of this release, Lookbook's UI is itself built using ViewComponent components. To help with development it is possible to preview these components (in a Lookbook instance!) by running the included 'Workbench" app, as follows:
27
+ Lookbook's UI is itself built using ViewComponents. To preview these components in a Lookbook instance you can run the included `workbench` app:
61
28
 
62
29
  1. Clone this repo
63
30
  2. Install dependencies: `bundle install & npm install`
64
- 3. Start the Workbench: `foreman start`
65
- 4. Open http://localhost:4545 in your browser to view the Workbench
31
+ 3. Start the app: `bin/workbench`
32
+ 4. Visit http://localhost:4545/lookbook to view the Lookbook instance
33
+
34
+ The `workbench` app will be started in development mode and any changes to Lookbook's views or assets will immediately be reflected in the UI.
66
35
 
67
- This will start the Workbench app in development mode and any changes to Lookbooks views or assets will immediately be visible in the UI.
36
+ ### Docs site
68
37
 
38
+ The [Lookbook docs site](https://lookbook.build) is built using [Bridgetown](https://www.bridgetownrb.com/) and the source files can be found in the `./docs` directory.
69
39
 
70
- ## Running tests
40
+ To see a local version of the site run `bin/docs` from the root of this repo and then visit http://localhost:4000 in your browser.
71
41
 
72
- The test suite is in the process of being completely overhauled.
42
+ ### Testing
73
43
 
74
- Tests are now written using RSpec and the system now uses [Combustion](https://github.com/pat/combustion) under the hood.
44
+ Lookbook uses RSpec for testing.
75
45
 
76
- - Tests can be run using the `rake lookbook:test` or `bundle exec rspec` commands.
77
- - The dummy app that the tests are being run against can be viewed by running the `rake lookbook:test:serve` command and then browsing to http://localhost:9292/lookbook
46
+ Tests can be run using the `rake spec` or `bundle exec rspec` commands.
78
47
 
48
+ The dummy app that the tests are being run against can be viewed by running the `bin/dummy` command and then browsing to http://localhost:9292/lookbook
79
49
 
80
- ---
81
50
 
82
51
  ## License
83
52
 
@@ -35,7 +35,7 @@ module Lookbook
35
35
  alpine_component_name = x_data || @html_attrs&.dig(:"x-data") || alpine_component
36
36
  if alpine_component_name.present?
37
37
  args = Array.wrap(alpine_data)
38
- args.any? ? "#{alpine_component_name}(#{safe_join(args).gsub("&quot;", "'").tr("\"", "'")})" : alpine_component_name
38
+ args.any? ? "#{alpine_component_name}(#{safe_join(args)})" : alpine_component_name
39
39
  end
40
40
  end
41
41
  end
@@ -46,11 +46,11 @@
46
46
  <span class="opacity-70 mr-1">Lookbook</span>
47
47
  <span class="mr-6">v<%= Lookbook::VERSION %></span>
48
48
  <div class="flex items-center space-x-2">
49
- <!-- a href="https://github.com/allmarkedup/lookbook" target="_blank" class="ml-auto opacity-70" title="Documentation">
50
- <%= icon :book, size: 3 %>
51
- </a -->
49
+ <a href="https://lookbook.build/guide" target="_blank" class="ml-auto opacity-70" title="Documentation">
50
+ <%= icon :book, size: 3 %>
51
+ </a>
52
52
  <a href="https://github.com/allmarkedup/lookbook" target="_blank" class="ml-auto opacity-70" title="Github">
53
- <%= icon :github, size: 3 %>
53
+ <%= icon :github, size: 3 %>
54
54
  </a>
55
55
  </div>
56
56
  </div>
@@ -25,9 +25,8 @@ module Lookbook
25
25
  css_parser.each_selector do |selector, declarations, specificity|
26
26
  @panel_styles += "##{id} #{selector} { #{declarations} }\n"
27
27
  end
28
- style_tag.unlink
29
28
  end
30
- @panel_html = panel_dom.to_html.html_safe
29
+ @panel_html = content.gsub(/<style(?:\s[^>]*)?>.*<\/style>/, "").html_safe
31
30
  end
32
31
  end
33
32
  @panel_html ||= content
@@ -1,7 +1,7 @@
1
1
  <%= render_component_tag class: "px-4 py-3" do %>
2
2
  <div class="flex items-start max-w-[800px]" :class="isNarrowLayout && '!block'">
3
3
  <label
4
- for="param-<%= @name %>"
4
+ for="param-<%= name %>"
5
5
  class="block font-bold cursor-pointer flex-none py-2 w-[140px] truncate pr-2">
6
6
  <%= label %>
7
7
  </label>
@@ -27,12 +27,12 @@
27
27
  <select
28
28
  class="form-input"
29
29
  x-bind="bindings.input || {}"
30
- x-model="value">
30
+ x-model="value"
31
+ name="<%= name %>">
31
32
  <%= options_for_select(@options || [], value) %>
32
33
  </select>
33
34
 
34
35
  <% elsif field_type == "toggle" %>
35
-
36
36
  <button type="button"
37
37
  class="<%= value == true ? "bg-lookbook-input-toggle-active" : "bg-lookbook-input-toggle" %> relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-input-border-focus"
38
38
  role="switch"
@@ -42,7 +42,6 @@
42
42
  class="<%= value == true ? "translate-x-5" : "translate-x-0" %> pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition ease-in-out duration-200"
43
43
  ></span>
44
44
  </button>
45
-
46
45
  <% end %>
47
46
  </div>
48
47
  </div>
@@ -1,5 +1,7 @@
1
1
  module Lookbook
2
2
  class ParamsEditor::Field::Component < Lookbook::BaseComponent
3
+ attr_reader :name
4
+
3
5
  def initialize(input:, name:, default: nil, value: nil, input_type: nil, type: nil, options: nil, **html_attrs)
4
6
  @input = input
5
7
  @name = name
@@ -12,7 +14,7 @@ module Lookbook
12
14
  end
13
15
 
14
16
  def label
15
- @name.titleize
17
+ name.titleize
16
18
  end
17
19
 
18
20
  def value
@@ -31,8 +33,8 @@ module Lookbook
31
33
  protected
32
34
 
33
35
  def alpine_data
34
- escaped_value = value.is_a?(String) ? helpers.j(value) : value
35
- "{name: '#{@name}', value: '#{escaped_value}'}"
36
+ escaped_value = helpers.raw json_escape(value.to_json)
37
+ "{name: '#{name}', value: #{escaped_value}}"
36
38
  end
37
39
 
38
40
  def alpine_component
@@ -6,6 +6,10 @@ module Lookbook
6
6
  render Lookbook::Icon::Component.new(name: name, **attrs)
7
7
  end
8
8
 
9
+ def code(**attrs, &block)
10
+ render Lookbook::Code::Component.new(**attrs), &block
11
+ end
12
+
9
13
  def render_component(ref, **attrs, &block)
10
14
  klass = component_class(ref)
11
15
  comp = attrs.key?(:content) ? klass.new(**attrs.except(:content)).with_content(attrs[:content]) : klass.new(**attrs)
@@ -7,7 +7,7 @@
7
7
  <% if Lookbook.previews? %>
8
8
  <p>Select a preview from the nav to get started.</p>
9
9
  <% else %>
10
- <p><a class="underline" href="https://beta.lookbook.build/guide/previews" target="_blank">Create a preview</a> to get started.</p>
10
+ <p><a class="underline" href="https://lookbook.build/guide/previews" target="_blank">Create a preview</a> to get started.</p>
11
11
  <% end %>
12
12
  </div>
13
13
  </div>
@@ -1,4 +1,3 @@
1
- require "rails"
2
1
  require "view_component"
3
2
  require "action_cable/engine"
4
3
  require "listen"
@@ -1,3 +1,3 @@
1
1
  module Lookbook
2
- VERSION = "1.0.0.rc.2"
2
+ VERSION = "1.0.1"
3
3
  end
@@ -1,18 +1,6 @@
1
1
  require_relative "../lookbook"
2
2
 
3
3
  namespace :lookbook do
4
- desc "Run the rspec tests"
5
- task :test do
6
- sh "bundle exec rspec"
7
- end
8
-
9
- namespace :test do
10
- desc "Start a server to view the test app"
11
- task :serve do
12
- sh "bundle exec rackup"
13
- end
14
- end
15
-
16
4
  namespace :previews do
17
5
  desc "Preparse the previews"
18
6
  task preparse: :environment do
@@ -20,21 +8,4 @@ namespace :lookbook do
20
8
  puts "Lookbook preview parsing complete"
21
9
  end
22
10
  end
23
-
24
- namespace :release do
25
- desc "Bump the Lookbook engine version number"
26
- task :bump_version, [:version] do |t, args|
27
- filename = Lookbook::Engine.root.join("lib/lookbook/version.rb")
28
- current_version = Lookbook::VERSION.to_s
29
- new_version = args[:version].sub("v", "").tr("-", ".")
30
- file = File.open(filename)
31
- contents = file.read
32
- File.write(filename, contents.gsub(current_version, new_version))
33
- end
34
-
35
- desc "Build Gem and push to RubyGems"
36
- task :build_and_push do
37
- sh("rake build && gem push pkg/lookbook-#{Lookbook::VERSION}.gem")
38
- end
39
- end
40
11
  end
@@ -0,0 +1 @@
1
+ {"mappings":"AAAA","sources":["app/assets/lookbook/css/themes/zinc.css"],"sourcesContent":[":root {\n --lookbook-white: theme(\"colors.white\");\n --lookbook-accent-50: theme(\"colors.zinc.50\");\n --lookbook-accent-100: theme(\"colors.zinc.100\");\n --lookbook-accent-200: theme(\"colors.zinc.200\");\n --lookbook-accent-300: theme(\"colors.zinc.300\");\n --lookbook-accent-400: theme(\"colors.zinc.400\");\n --lookbook-accent-500: theme(\"colors.zinc.500\");\n --lookbook-accent-600: theme(\"colors.zinc.600\");\n --lookbook-accent-700: theme(\"colors.zinc.700\");\n --lookbook-accent-800: theme(\"colors.zinc.800\");\n --lookbook-accent-900: theme(\"colors.zinc.900\");\n --lookbook-base-50: theme(\"colors.zinc.50\");\n --lookbook-base-100: theme(\"colors.zinc.100\");\n --lookbook-base-200: theme(\"colors.zinc.200\");\n --lookbook-base-300: theme(\"colors.zinc.300\");\n --lookbook-base-400: theme(\"colors.zinc.400\");\n --lookbook-base-500: theme(\"colors.zinc.500\");\n --lookbook-base-600: theme(\"colors.zinc.600\");\n --lookbook-base-700: theme(\"colors.zinc.700\");\n --lookbook-base-800: theme(\"colors.zinc.800\");\n --lookbook-base-900: theme(\"colors.zinc.900\");\n --lookbook-text: var(--lookbook-base-800);\n --lookbook-divider: var(--lookbook-base-300);\n --lookbook-icon-button-stroke: var(--lookbook-base-400);\n --lookbook-icon-button-stroke-hover: var(--lookbook-accent-600);\n --lookbook-tooltip-bg: var(--lookbook-accent-500);\n --lookbook-tooltip-text: var(--lookbook-white);\n --lookbook-scrollbar: var(--lookbook-base-200);\n --lookbook-scrollbar-hover: var(--lookbook-base-300);\n --lookbook-toolbar-bg: var(--lookbook-white);\n --lookbook-toolbar-divider: var(--lookbook-divider);\n --lookbook-nav-text: var(--lookbook-text);\n --lookbook-nav-toggle: var(--lookbook-base-500);\n --lookbook-nav-icon-stroke: var(--lookbook-accent-500);\n --lookbook-nav-item-hover: var(--lookbook-base-100);\n --lookbook-nav-item-active: var(--lookbook-accent-50);\n --lookbook-input-bg: var(--lookbook-white);\n --lookbook-input-border: var(--lookbook-base-300);\n --lookbook-input-border-focus: var(--lookbook-accent-200);\n --lookbook-input-text: var(--lookbook-base-600);\n --lookbook-input-text-placeholder: var(--lookbook-base-400);\n --lookbook-input-toggle: var(--lookbook-base-300);\n --lookbook-input-toggle-active: var(--lookbook-accent-500);\n --lookbook-prose-bg: var(--lookbook-white);\n --lookbook-prose-text: var(--lookbook-base-600);\n --lookbook-prose-link: var(--lookbook-accent-900);\n --lookbook-tabs-text: var(--lookbook-base-500);\n --lookbook-tabs-text-hover: var(--lookbook-base-700);\n --lookbook-tabs-text-disabled: var(--lookbook-base-300);\n --lookbook-tabs-border-active: var(--lookbook-accent-400);\n --lookbook-viewport-handle: var(--lookbook-white);\n --lookbook-viewport-handle-icon-stroke: var(--lookbook-base-300);\n --lookbook-viewport-handle-icon-stroke-hover: var(--lookbook-base-700);\n --lookbook-sidebar-bg: var(--lookbook-base-50);\n --lookbook-page-bg: var(--lookbook-white);\n --lookbook-drawer-bg: var(--lookbook-base-50);\n --lookbook-header-bg: var(--lookbook-accent-600);\n --lookbook-header-text: var(--lookbook-white);\n --lookbook-header-border: var(--lookbook-accent-700);\n --lookbook-blank-slate-title: var(--lookbook-accent-600);\n --lookbook-branding-text: var(--lookbook-header-text);\n --lookbook-draggable-hint: rgb(224 231 255 / 0.2);\n}\n"],"names":[],"version":3,"file":"zinc.css.map","sourceRoot":"../../../../"}
File without changes
@@ -7701,17 +7701,7 @@ function $5439cede634b2921$var$toCamel(s) {
7701
7701
  }
7702
7702
 
7703
7703
 
7704
- var $f959e58624110d32$exports = {};
7705
- var $99486586f6691564$exports = {};
7706
-
7707
- $parcel$defineInteropFlag($99486586f6691564$exports);
7708
-
7709
- $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
7710
- function $99486586f6691564$export$2e2bcd8739ae039() {
7711
- return {};
7712
- }
7713
-
7714
-
7704
+ var $730b795bb0498251$exports = {};
7715
7705
  var $cbd28b10fa9798c7$exports = {};
7716
7706
 
7717
7707
  $parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
@@ -11364,6 +11354,72 @@ function $cbd28b10fa9798c7$export$2e2bcd8739ae039() {
11364
11354
  }
11365
11355
 
11366
11356
 
11357
+ var $99486586f6691564$exports = {};
11358
+
11359
+ $parcel$defineInteropFlag($99486586f6691564$exports);
11360
+
11361
+ $parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
11362
+ function $99486586f6691564$export$2e2bcd8739ae039() {
11363
+ return {};
11364
+ }
11365
+
11366
+
11367
+ var $47a1c62621be0c54$exports = {};
11368
+
11369
+ $parcel$defineInteropFlag($47a1c62621be0c54$exports);
11370
+
11371
+ $parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
11372
+ var $122263eab94cad08$exports = {};
11373
+
11374
+ $parcel$defineInteropFlag($122263eab94cad08$exports);
11375
+
11376
+ $parcel$export($122263eab94cad08$exports, "initClipboard", () => $122263eab94cad08$export$c6684e6159b21de3);
11377
+ $parcel$export($122263eab94cad08$exports, "default", () => $122263eab94cad08$export$2e2bcd8739ae039);
11378
+
11379
+ function $122263eab94cad08$export$c6684e6159b21de3(context = {}) {
11380
+ let copyTimeout = null;
11381
+ return Object.assign(context, {
11382
+ copied: false,
11383
+ async copyToClipboard (target = null) {
11384
+ let targetEl;
11385
+ if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget;
11386
+ else if (typeof target === "string") targetEl = document.querySelector(target);
11387
+ if (!targetEl) {
11388
+ this.warn("Could not find copy target");
11389
+ return false;
11390
+ }
11391
+ const content = (0, $7ae6ae39c2ec9059$export$6cb344a21ca18aec)(targetEl.innerHTML.trim());
11392
+ await window.navigator.clipboard.writeText(content);
11393
+ this.copied = true;
11394
+ if (copyTimeout) clearTimeout(copyTimeout);
11395
+ copyTimeout = setTimeout(()=>{
11396
+ this.copied = false;
11397
+ this.onCopyComplete();
11398
+ }, 1000);
11399
+ return content;
11400
+ },
11401
+ onCopyComplete () {}
11402
+ });
11403
+ }
11404
+ function $122263eab94cad08$export$2e2bcd8739ae039() {
11405
+ return $122263eab94cad08$export$c6684e6159b21de3({});
11406
+ }
11407
+
11408
+
11409
+
11410
+ function $47a1c62621be0c54$export$2e2bcd8739ae039() {
11411
+ const button = (0, $cbd28b10fa9798c7$export$2e2bcd8739ae039)();
11412
+ return {
11413
+ ...button,
11414
+ copied: false,
11415
+ init () {
11416
+ button.init.bind(this)();
11417
+ (0, $122263eab94cad08$export$c6684e6159b21de3)(this);
11418
+ }
11419
+ };
11420
+ }
11421
+
11422
+
11367
11423
  var $e398acaded942bbe$exports = {};
11368
11424
 
11369
11425
  $parcel$defineInteropFlag($e398acaded942bbe$exports);
@@ -11397,31 +11453,6 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
11397
11453
  }
11398
11454
 
11399
11455
 
11400
- var $e9904a14dabf652d$exports = {};
11401
-
11402
- $parcel$defineInteropFlag($e9904a14dabf652d$exports);
11403
-
11404
- $parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
11405
- function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
11406
- return {
11407
- focussed: false,
11408
- get active () {
11409
- return store.active;
11410
- },
11411
- get text () {
11412
- return store.text;
11413
- },
11414
- clear () {
11415
- if (store.raw === "") this.$refs.input.blur();
11416
- else store.raw = "";
11417
- },
11418
- focus () {
11419
- this.$refs.input.focus();
11420
- }
11421
- };
11422
- }
11423
-
11424
-
11425
11456
  var $e1f51f020443edd4$exports = {};
11426
11457
 
11427
11458
  $parcel$defineInteropFlag($e1f51f020443edd4$exports);
@@ -12287,57 +12318,26 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) {
12287
12318
  }
12288
12319
 
12289
12320
 
12290
- var $47a1c62621be0c54$exports = {};
12291
-
12292
- $parcel$defineInteropFlag($47a1c62621be0c54$exports);
12293
-
12294
- $parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
12295
- var $122263eab94cad08$exports = {};
12296
-
12297
- $parcel$defineInteropFlag($122263eab94cad08$exports);
12298
-
12299
- $parcel$export($122263eab94cad08$exports, "initClipboard", () => $122263eab94cad08$export$c6684e6159b21de3);
12300
- $parcel$export($122263eab94cad08$exports, "default", () => $122263eab94cad08$export$2e2bcd8739ae039);
12301
-
12302
- function $122263eab94cad08$export$c6684e6159b21de3(context = {}) {
12303
- let copyTimeout = null;
12304
- return Object.assign(context, {
12305
- copied: false,
12306
- async copyToClipboard (target = null) {
12307
- let targetEl;
12308
- if (this.$refs.copyTarget) targetEl = this.$refs.copyTarget;
12309
- else if (typeof target === "string") targetEl = document.querySelector(target);
12310
- if (!targetEl) {
12311
- this.warn("Could not find copy target");
12312
- return false;
12313
- }
12314
- const content = (0, $7ae6ae39c2ec9059$export$6cb344a21ca18aec)(targetEl.innerHTML.trim());
12315
- await window.navigator.clipboard.writeText(content);
12316
- this.copied = true;
12317
- if (copyTimeout) clearTimeout(copyTimeout);
12318
- copyTimeout = setTimeout(()=>{
12319
- this.copied = false;
12320
- this.onCopyComplete();
12321
- }, 1000);
12322
- return content;
12323
- },
12324
- onCopyComplete () {}
12325
- });
12326
- }
12327
- function $122263eab94cad08$export$2e2bcd8739ae039() {
12328
- return $122263eab94cad08$export$c6684e6159b21de3({});
12329
- }
12330
-
12321
+ var $e9904a14dabf652d$exports = {};
12331
12322
 
12323
+ $parcel$defineInteropFlag($e9904a14dabf652d$exports);
12332
12324
 
12333
- function $47a1c62621be0c54$export$2e2bcd8739ae039() {
12334
- const button = (0, $cbd28b10fa9798c7$export$2e2bcd8739ae039)();
12325
+ $parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
12326
+ function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
12335
12327
  return {
12336
- ...button,
12337
- copied: false,
12338
- init () {
12339
- button.init.bind(this)();
12340
- (0, $122263eab94cad08$export$c6684e6159b21de3)(this);
12328
+ focussed: false,
12329
+ get active () {
12330
+ return store.active;
12331
+ },
12332
+ get text () {
12333
+ return store.text;
12334
+ },
12335
+ clear () {
12336
+ if (store.raw === "") this.$refs.input.blur();
12337
+ else store.raw = "";
12338
+ },
12339
+ focus () {
12340
+ this.$refs.input.focus();
12341
12341
  }
12342
12342
  };
12343
12343
  }
@@ -13210,13 +13210,13 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
13210
13210
  }
13211
13211
 
13212
13212
 
13213
- $f959e58624110d32$exports = {
13214
- "code": $99486586f6691564$exports,
13213
+ $730b795bb0498251$exports = {
13215
13214
  "button": $cbd28b10fa9798c7$exports,
13215
+ "code": $99486586f6691564$exports,
13216
+ "copy_button": $47a1c62621be0c54$exports,
13216
13217
  "dimensions_display": $e398acaded942bbe$exports,
13217
- "filter": $e9904a14dabf652d$exports,
13218
13218
  "embed": $e1f51f020443edd4$exports,
13219
- "copy_button": $47a1c62621be0c54$exports,
13219
+ "filter": $e9904a14dabf652d$exports,
13220
13220
  "icon": $36506012e0c6e9e3$exports,
13221
13221
  "nav": $d92d9d5253f84566$exports,
13222
13222
  "params_editor": $b63b9c6d236b3f65$exports,
@@ -13367,7 +13367,7 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME;
13367
13367
  // Components
13368
13368
  (0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
13369
13369
  [
13370
- $f959e58624110d32$exports,
13370
+ $730b795bb0498251$exports,
13371
13371
  $e4eab7529959b73b$exports,
13372
13372
  $4979d2d897a1c01f$exports
13373
13373
  ].forEach((scripts)=>{