<commit_before>#lang racket

(require fractalide/modules/rkt/rkt-fbp/graph)

(define-graph
  (node "vp" ${gui.vertical-panel})
  (edge-out "vp" "out" "out")
  (edge-in "in" "vp" "in")

  (node "headline" ${gui.message})
  (edge "headline" "out" _ "vp" "place" 10)
  (mesg "headline" "in" '(init . ((label . "Wallet settings"))))

  (node "name-label" ${gui.message})
  (edge "name-label" "out" _ "vp" "place" 20)
  (mesg "name-label" "in" '(init . ((label . "Name"))))

  (node "name" ${gui.text-field})
  (edge "name" "out" _ "vp" "place" 30)
  (mesg "name" "in" '(init . ((label . ""))))

  (node "name-in" ${plumbing.option-transform})
  (mesg "name-in" "option" (lambda (x) (cons 'set-value x)))
  (edge "name-in" "out" _ "name" "in" _)
  (edge-in "name" "name-in" "in")

  (node "name-out" ${plumbing.option-transform})
  (mesg "name-out" "option" cdr)
  (edge "name" "out" 'text-field-enter "name-out" "in" _)
  (edge-out "name-out" "out" "name")

  (node "assurance-level-label" ${gui.message})
  (edge "assurance-level-label" "out" _ "vp" "place" 40)
  (mesg "assurance-level-label" "in" '(init . ((label . "Transaction assurance security level"))))

  (node "assurance-level" ${gui.choice})
  (edge "assurance-level" "out" _ "vp" "place" 50)
  (mesg "assurance-level" "in" '(init . ((choices . ("Low" "Medium" "High")))))

  (node "assurance-level-in" ${plumbing.option-transform})
  (mesg "assurance-level-in" "option" (lambda (choice) (cons 'set-string-selection choice)))
  (edge "assurance-level-in" "out" _  "assurance-level" "in" _)
  (edge-in "assurance-level" "assurance-level-in" "in")

  (node "assurance-level-out" ${plumbing.option-transform})
  (mesg "assurance-level-out" "option" (match-lambda [(cons 'choice choice) choice]))
  (edge "assurance-level" "out" 'choice "assurance-level-out" "in" _)
  (edge-out "assurance-level-out" "out" "assurance-level")

  (node "password-label" ${gui.message})
  (edge "password-label" "out" _ "vp" "place" 60)
  (mesg "password-label" "in" '(init . ((label . "Password"))))

  (node "password" ${card<PASSWORD>-wallet.password})
  (edge "password" "out" _ "vp" "place" 70)
  (mesg "password" "in" '(display . #t))

  (node "display-password" ${displayer})
  (mesg "display-password" "option" "set password: ")
  (edge "password" "password" _ "display-password" "in" _)

  (node "delete" ${cardano-wallet.delete})
  (edge "delete" "out" _ "vp" "place" 80)
  (mesg "delete" "in" '(display . #t))
  (edge-out "delete" "delete" "delete")
  (mesg "delete" "wallet-name" "my wallet"))<commit_msg>Problem: Wallet name is not fed into the delete widget<commit_after>#lang racket

(require fractalide/modules/rkt/rkt-fbp/graph)

(define-graph
  (node "vp" ${gui.vertical-panel})
  (edge-out "vp" "out" "out")
  (edge-in "in" "vp" "in")

  (node "headline" ${gui.message})
  (edge "headline" "out" _ "vp" "place" 10)
  (mesg "headline" "in" '(init . ((label . "Wallet settings"))))

  (node "name-label" ${gui.message})
  (edge "name-label" "out" _ "vp" "place" 20)
  (mesg "name-label" "in" '(init . ((label . "Name"))))

  (node "name" ${gui.text-field})
  (edge "name" "out" _ "vp" "place" 30)
  (mesg "name" "in" '(init . ((label . ""))))

  (node "name-in" ${plumbing.demux})
  (mesg "name-in" "option"
        (lambda (new-name) (list (list* "name" 'set-value new-name)
                                 (list* "delete" new-name))))
  (edge "name-in" "out" "name" "name" "in" _)
  (edge "name-in" "out" "delete" "delete" "wallet-name" _)
  (edge-in "name" "name-in" "in")

  (node "name-out" ${plumbing.option-transform})
  (mesg "name-out" "option" cdr)
  (edge "name" "out" 'text-field-enter "name-out" "in" _)
  (edge-out "name-out" "out" "name")

  (node "assurance-level-label" ${gui.message})
  (edge "assurance-level-label" "out" _ "vp" "place" 40)
  (mesg "assurance-level-label" "in" '(init . ((label . "Transaction assurance security level"))))

  (node "assurance-level" ${gui.choice})
  (edge "assurance-level" "out" _ "vp" "place" 50)
  (mesg "assurance-level" "in" '(init . ((choices . ("Low" "Medium" "High")))))

  (node "assurance-level-in" ${plumbing.option-transform})
  (mesg "assurance-level-in" "option" (lambda (choice) (cons 'set-string-selection choice)))
  (edge "assurance-level-in" "out" _  "assurance-level" "in" _)
  (edge-in "assurance-level" "assurance-level-in" "in")

  (node "assurance-level-out" ${plumbing.option-transform})
  (mesg "assurance-level-out" "option" (match-lambda [(cons 'choice choice) choice]))
  (edge "assurance-level" "out" 'choice "assurance-level-out" "in" _)
  (edge-out "assurance-level-out" "out" "assurance-level")

  (node "password-label" ${gui.message})
  (edge "password-label" "out" _ "vp" "place" 60)
  (mesg "password-label" "in" '(init . ((label . "Password"))))

  (node "password" ${cardano-wallet.password})
  (edge "password" "out" _ "vp" "place" 70)
  (mesg "password" "in" '(display . #t))

  (node "display-password" ${displayer})
  (mesg "display-password" "option" "set password: ")
  (edge "password" "password" _ "display-password" "in" _)

  (node "delete" ${cardano-wallet.delete})
  (edge "delete" "out" _ "vp" "place" 80)
  (mesg "delete" "in" '(display . #t))
  (edge-out "delete" "delete" "delete"))
{'fraction_non_alphanumeric': 0.22277322143810796, 'fraction_numerical': 0.006103375929811177, 'mean_word_length': 4.106134371957157, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5827737', 'n_tokens_mistral': 2110, 'n_tokens_neox': 2047, 'n_words': 493}